name: Linter on: - push - pull_request jobs: lint-python: name: ruff runs-on: ubuntu-latest steps: - name: Verify repository run: | if [ "$GITHUB_REPOSITORY" != "m-cahill/serena" ]; then echo "::error::Serena CI must run only inside m-cahill/serena, not $GITHUB_REPOSITORY" exit 1 fi - name: Checkout Code uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 with: python-version: 3.11 # NB: there's no cache: pip here since we're not installing anything # from the requirements.txt file(s) in the repository; it's faster # not to have GHA download an (at the time of writing) 4 GB cache # of PyTorch and other dependencies. - name: Install Ruff run: pip install ruff==0.3.3 - name: Run Ruff run: ruff . lint-js: name: eslint runs-on: ubuntu-latest steps: - name: Verify repository run: | if [ "$GITHUB_REPOSITORY" != "m-cahill/serena" ]; then echo "::error::Serena CI must run only inside m-cahill/serena, not $GITHUB_REPOSITORY" exit 1 fi - name: Checkout Code uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 - name: Install Node.js uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 with: node-version: 18 - run: npm i --ci - run: npm run lint