summaryrefslogtreecommitdiff
path: root/.github/workflows/lint.yml
blob: 0c885cd1c8bc02c0c9068c7ecb02fcc3477f1db6 (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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
name: lint

on: [push]

jobs:
  clippy:
    name: lint
    runs-on: ubuntu-latest
    steps:
      - name: Configure git
        run: git config --global core.symlinks true

      - name: Clone repository
        uses: actions/checkout@v1
        with:
          fetch-depth: 1
          submodules: true

      - name: Install clippy and rustfmt
        run: |
          rustup component add clippy
          rustup component add rustfmt

      - name: Environment (common)
        run: |
          echo ::set-env name=RUSTC_WRAPPER::sccache
          echo ::set-env name=DENO_BUILD_MODE::release
          echo ::add-path::`pwd`/prebuilt/linux64

      - name: Run setup.py
        run: python ./tools/setup.py

      - name: Start sccache
        env:
          AWS_ACCESS_KEY_ID: AKIAIVRN52PLDBP55LBQ
          AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
          SCCACHE_BUCKET: deno-sccache
          SCCACHE_IDLE_TIMEOUT: 0
        run: sccache --start-server

      - name: lint.py
        run: python ./tools/lint.py

      - name: test_format.py
        run: python ./tools/test_format.py

      - name: Clippy
        run: cargo clippy --all-targets --release --locked -- -D clippy::all

      - name: Stop sccache
        run: sccache --stop-server