Skip to content

Commit

Permalink
Update CI actions
Browse files Browse the repository at this point in the history
  • Loading branch information
niluxv committed May 2, 2024
1 parent d53eb83 commit 7c6db5f
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 46 deletions.
67 changes: 23 additions & 44 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,13 @@ jobs:
os: [ubuntu-latest, windows-latest]
steps:
- name: Checkout sources
uses: actions/checkout@v2
uses: actions/checkout@v4

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

- name: Run cargo check
uses: actions-rs/cargo@v1
uses: clechasseur/rs-cargo@v2
with:
command: check

Expand All @@ -33,17 +29,13 @@ jobs:
os: [ubuntu-latest, windows-latest]
steps:
- name: Checkout sources
uses: actions/checkout@v2
uses: actions/checkout@v4

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

- name: Run cargo test
uses: actions-rs/cargo@v1
uses: clechasseur/rs-cargo@v2
with:
command: test
args: --no-default-features --features dev
Expand All @@ -56,17 +48,13 @@ jobs:
os: [ubuntu-latest, windows-latest]
steps:
- name: Checkout sources
uses: actions/checkout@v2
uses: actions/checkout@v4

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

- name: Run cargo test
uses: actions-rs/cargo@v1
uses: clechasseur/rs-cargo@v2
with:
command: test
args: --all-features
Expand All @@ -78,17 +66,13 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v2
uses: actions/checkout@v4

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

- name: Run cargo doc
uses: actions-rs/cargo@v1
uses: clechasseur/rs-cargo@v2
with:
command: doc
args: --all-features
Expand All @@ -98,18 +82,15 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v2
uses: actions/checkout@v4

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

- name: Run cargo fmt
uses: actions-rs/cargo@v1
uses: clechasseur/rs-cargo@v2
with:
command: fmt
args: -- --check
Expand All @@ -119,34 +100,32 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Install nightly toolchain
uses: actions-rs/toolchain@v1
uses: dtolnay/rust-toolchain@nightly
with:
toolchain: nightly
components: clippy
override: true
- uses: actions-rs/clippy-check@v1

- uses: clechasseur/rs-cargo@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
command: clippy
args: --all-features

miri:
name: Miri
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Get latest toolchain version with miri
run: echo "TOOLCHAIN=$(curl -s https://rust-lang.github.io/rustup-components-history/x86_64-unknown-linux-gnu/miri)" >> $GITHUB_ENV

- name: Install latest nightly toolchain with miri
uses: actions-rs/toolchain@v1
uses: dtolnay/rust-toolchain@master
with:
profile: minimal
toolchain: nightly-${{ env.TOOLCHAIN }}
override: true
components: rust-src, miri

- name: Run cargo miri test
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,14 @@ jobs:
options: --security-opt seccomp=unconfined
steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Generate code coverage
run: |
cargo +nightly tarpaulin --verbose --all-features --workspace --timeout 120 --out xml
- name: Upload to codecov.io
uses: codecov/codecov-action@v2
uses: codecov/codecov-action@v4
with:
token: ${{secrets.CODECOV_TOKEN}}
fail_ci_if_error: true

0 comments on commit 7c6db5f

Please sign in to comment.