diff options
-rw-r--r-- | .github/workflows/build.yml | 24 | ||||
-rw-r--r-- | .github/workflows/lint.yml | 51 |
2 files changed, 23 insertions, 52 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d82914a48..a1c321c98 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -10,12 +10,16 @@ jobs: strategy: matrix: os: [macOS-10.14, windows-2016, ubuntu-16.04] - kind: ['test', 'bench'] + kind: ['test', 'bench', 'lint'] exclude: - os: windows-2016 kind: 'bench' + - os: windows-2016 + kind: 'lint' - os: macOS-10.14 kind: 'bench' + - os: macOS-10.14 + kind: 'lint' steps: - name: Configure git run: git config --global core.symlinks true @@ -31,6 +35,12 @@ jobs: with: rust-version: "1.38.0" + - name: Install clippy and rustfmt + if: matrix.kind == 'lint' + run: | + rustup component add clippy + rustup component add rustfmt + - name: Install python uses: actions/setup-python@v1 with: @@ -76,6 +86,18 @@ jobs: SCCACHE_IDLE_TIMEOUT: 0 run: sccache --start-server + - name: lint.py + if: matrix.kind == 'lint' + run: python ./tools/lint.py + + - name: test_format.py + if: matrix.kind == 'lint' + run: python ./tools/test_format.py + + - name: Clippy + if: matrix.kind == 'lint' + run: cargo clippy --all-targets --release --locked -- -D clippy::all + - name: Build run: cargo build --release --locked --all-targets diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml deleted file mode 100644 index 2f6ea0be8..000000000 --- a/.github/workflows/lint.yml +++ /dev/null @@ -1,51 +0,0 @@ -name: lint - -on: [push, pull_request] - -jobs: - clippy: - name: lint - runs-on: ubuntu-16.04 - 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 - 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 |