Skip to content

Commit

Permalink
Update CI deps
Browse files Browse the repository at this point in the history
  • Loading branch information
sonro committed Jul 16, 2024
1 parent 18d81a0 commit 671eb7f
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 55 deletions.
94 changes: 43 additions & 51 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,99 +4,91 @@ on:
push:
branches:
- master
- ci
pull_request:
branches:
- master

jobs:
tests:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
# minimum supported rust version
rust: [stable, beta, nightly, 1.68.0]
on:
- { os: ubuntu-latest, target: x86_64-unknown-linux-gnu }
- { os: macos-latest, target: x86_64-apple-darwin }
- { os: windows-latest, target: x86_64-pc-windows-msvc }

runs-on: ${{ matrix.on.os }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Install toolchain
uses: actions-rs/toolchain@v1
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust }}
override: true
target: ${{ matrix.on.target }}

- name: Build tests
uses: actions-rs/cargo@v1
- name: Cache
uses: Swatinem/rust-cache@v2
with:
command: test
args: --no-run
shared-key: ${{ matrix.rust }}_${{ matrix.on.os }}

- name: Build tests
run: cargo test --no-run

- name: Run tests
uses: actions-rs/cargo@v1
with:
command: test
run: cargo test

clippy:
rustfmt:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Install minimal toolchain
uses: actions-rs/toolchain@v1
- name: Install stable
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
override: true
profile: minimal
components: clippy
components: rustfmt

- name: Run clippy
uses: actions-rs/cargo@v1
with:
command: clippy
args: -- -D warnings
- name: Run rustfmt
run: cargo fmt --all --check

docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Install minimal toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
profile: minimal
- name: Install nightly
uses: dtolnay/rust-toolchain@nightly

- name: Run rustdoc
- name: cargo doc
env:
RUSTDOCFLAGS: -D warnings
uses: actions-rs/cargo@v1
with:
command: doc
args: --no-deps --document-private-items
RUSTDOCFLAGS: --cfg docsrs -D warnings
run: cargo doc --no-deps --all-features --document-private-items

fmt:
clippy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Install minimal toolchain
uses: actions-rs/toolchain@v1
- name: Install stable
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
override: true
profile: minimal
components: rustfmt
components: clippy

- name: Run rustfmt
uses: actions-rs/cargo@v1
- name: Cache
uses: Swatinem/rust-cache@v2
with:
command: fmt
args: --all --check
shared-key: stable_ubuntu-latest

- name: Run clippy
run: cargo clippy --all-features --all-targets --workspace -- -D warnings

codecov:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Install stable toolchain
uses: actions-rs/toolchain@v1
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/codecov-comment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ jobs:

steps:
- name: Get results
uses: dawidd6/action-download-artifact@v2
uses: dawidd6/action-download-artifact@v6
with:
workflow: ci
workflow: ci.yml
run_id: ${{ env.PR_RUN_ID }}
name: code_coverage_result

Expand All @@ -41,9 +41,9 @@ jobs:
sed -i '/!\[\|<!--/!d' code-coverage-results.md
- name: Get PR number
uses: dawidd6/action-download-artifact@v2
uses: dawidd6/action-download-artifact@v6
with:
workflow: ci
workflow: ci.yml
run_id: ${{ env.PR_RUN_ID }}
name: pr_number

Expand Down

0 comments on commit 671eb7f

Please sign in to comment.