ci: Migrate Gitlab tests to GitHub runner #15
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Clippy-checks | |
on: | |
pull_request: | |
push: | |
branches: | |
- develop | |
- master | |
- 'refs/tags/[0-9]+.[0-9]+.[0-9]+*' | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
env: | |
RUSTDOCFLAGS: '-D warnings' | |
jobs: | |
clippy: | |
name: Run Clippy with different features combinations | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
features: | |
- | |
- --all-features | |
steps: | |
- name: Download repository | |
uses: actions/checkout@v4 | |
- name: Set up Rust toolchain | |
uses: actions-rust-lang/setup-rust-toolchain@v1 | |
- name: Set up cargo cache | |
uses: actions/cache@v4 | |
with: | |
path: | | |
~/.cargo/bin/ | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
target/ | |
key: ${{ github.job }}-${{ github.ref }}-${{ matrix.features }}-cargo-cache | |
- name: Run Test | |
run: | | |
docker run --rm \ | |
-v "${GITHUB_WORKSPACE}:/workspace" \ | |
-v "${HOME}/.cargo:/root/.cargo" \ | |
-w /workspace \ | |
-e RUSTDOCFLAGS='-D warnings' \ | |
-e SKIP_WASM_BUILD=1 \ | |
paritytech/ci-unified:bullseye-1.74.0 \ | |
bash -c "cargo clippy --locked --quiet ${{ matrix.features }}" |