aboutsummaryrefslogtreecommitdiff
path: root/.github/workflows/on_pull_request.yaml
blob: 7b7219fd6b061042c440baf19a1885521c3669ef (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
name: Run Linting/Formatting on Pull Requests

on:
  - push
  - pull_request

jobs:
  lint-python:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout Code
        uses: actions/checkout@v3
      - uses: actions/setup-python@v4
        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.0.265
      - name: Run Ruff
        run: ruff .
  lint-js:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout Code
        uses: actions/checkout@v3
      - name: Install Node.js
        uses: actions/setup-node@v3
        with:
          node-version: 18
      - run: npm i --ci
      - run: npm run lint