diff --git a/.github/workflows/ci-tests.yml b/.github/workflows/ci-tests.yml index 82c150be..9fe7cb93 100644 --- a/.github/workflows/ci-tests.yml +++ b/.github/workflows/ci-tests.yml @@ -1,82 +1,75 @@ name: "ci tests" on: - push: - branches: - - main - - plain-cumulus-template - paths-ignore: - - "**.md" - pull_request: - paths-ignore: - - "**.md" - workflow_dispatch: - inputs: - test-macos-and-windows: - description: "run macOS and Windows tests" - required: true - default: false - type: boolean + push: + branches: + - main + - plain-cumulus-template + paths-ignore: + - "**.md" + pull_request: + paths-ignore: + - "**.md" + workflow_dispatch: + inputs: + test-macos-and-windows: + description: "run macOS and Windows tests" + required: true + default: false + type: boolean env: - # Not needed in CI, should make things a bit faster - CARGO_INCREMENTAL: 0 - CARGO_TERM_COLOR: always - # Remove unnecessary WASM build artefacts - WASM_BUILD_CLEAN_TARGET: 1 + # Not needed in CI, should make things a bit faster + CARGO_INCREMENTAL: 0 + CARGO_TERM_COLOR: always + # Remove unnecessary WASM build artefacts + WASM_BUILD_CLEAN_TARGET: 1 jobs: - clippy-fmt-test: - strategy: - fail-fast: false - matrix: - os: - - ubuntu-22.04 - - macos-12 - - windows-2022 - run-all: - - ${{ inputs.test-macos-and-windows == true || github.ref == 'refs/heads/main' }} - exclude: # exclude macos-12 and windows-2022 when the condition is false - - run-all: false - os: macos-12 - - run-all: false - os: windows-2022 + clippy-fmt-test: + strategy: + fail-fast: false + matrix: + os: + - ubuntu-22.04 + - macos-12 + - windows-2022 + run-all: + - ${{ inputs.test-macos-and-windows == true || github.ref == 'refs/heads/main' }} + exclude: # exclude macos-12 and windows-2022 when the condition is false + - run-all: false + os: macos-12 + - run-all: false + os: windows-2022 - runs-on: ${{ matrix.os }} - steps: - - name: git checkout - uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # @v3.1.0 + runs-on: ${{ matrix.os }} + steps: + - name: git checkout + uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # @v3.1.0 - - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: nightly - override: true - components: rustfmt, clippy + - name: Install Protoc + uses: arduino/setup-protoc@9b1ee5b22b0a3f1feb8c2ff99b32c89b3c3191e9 # v2.0.0 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} - - name: Install Protoc - uses: arduino/setup-protoc@9b1ee5b22b0a3f1feb8c2ff99b32c89b3c3191e9 # v2.0.0 - with: - repo-token: ${{ secrets.GITHUB_TOKEN }} + - name: cargo fmt + uses: actions-rs/cargo@ae10961054e4aa8b4aa7dffede299aaf087aa33b # @v1.0.1 + with: + command: fmt + args: --all -- --check - - name: cargo fmt - uses: actions-rs/cargo@ae10961054e4aa8b4aa7dffede299aaf087aa33b # @v1.0.1 - with: - command: fmt - args: --all -- --check + - name: cargo test --locked + uses: actions-rs/cargo@ae10961054e4aa8b4aa7dffede299aaf087aa33b # @v1.0.1 + with: + command: test - - name: cargo test --locked - uses: actions-rs/cargo@ae10961054e4aa8b4aa7dffede299aaf087aa33b # @v1.0.1 - with: - command: test + - name: cargo clippy --locked + uses: actions-rs/clippy-check@b5b5f21f4797c02da247df37026fcd0a5024aa4d # @v1.0.7 + with: + token: ${{ secrets.GITHUB_TOKEN }} + args: --locked --all-targets -- -D warnings - - name: cargo clippy --locked - uses: actions-rs/clippy-check@b5b5f21f4797c02da247df37026fcd0a5024aa4d # @v1.0.7 - with: - token: ${{ secrets.GITHUB_TOKEN }} - args: --locked --all-targets -- -D warnings - - - name: Check Documentation - run: cargo doc --locked --all --no-deps - env: - RUSTDOCFLAGS: "-D rustdoc::broken-intra-doc-links -D rustdoc::private_intra_doc_links" + - name: Check Documentation + run: cargo doc --locked --all --no-deps + env: + RUSTDOCFLAGS: "-D rustdoc::broken-intra-doc-links -D rustdoc::private_intra_doc_links" diff --git a/rust-toolchain.toml b/rust-toolchain.toml index c3dc5604..e43f5e9b 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,3 +1,3 @@ [toolchain] -channel = "stable-2023-11-16" +channel = "nightly-2023-11-16" targets = ["wasm32-unknown-unknown"]