Skip to content

Commit

Permalink
Update rust.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
nathansam authored Nov 30, 2023
1 parent f1d4fc7 commit 1bb95bf
Showing 1 changed file with 11 additions and 50 deletions.
61 changes: 11 additions & 50 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# Instruction + template repo: https://github.com/FedericoPonzi/rust-ci
name: CI

on:
Expand All @@ -16,21 +15,9 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v3

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

- name: cargo fmt -- --check
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check

uses: dtolnay/rust-toolchain@stable
- run: cargo fmt --all --check

test:
name: Test
Expand All @@ -51,31 +38,12 @@ jobs:
- name: Checkout
uses: actions/checkout@v3

- name: Install rust
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.rust || 'stable' }}
profile: minimal
override: true

- name: Build debug
uses: actions-rs/cargo@v1
with:
command: build
args: ${{ matrix.features }}
uses: dtolnay/rust-toolchain@stable
- run: cargo build

- name: Test
uses: actions-rs/cargo@v1
with:
command: test
args: ${{ matrix.features }}

- name: Test all benches
if: matrix.benches
uses: actions-rs/cargo@v1
with:
command: test
args: --benches ${{ matrix.features }}
- run: cargo test --all --verbose

Coverage:
name: Upload Test Coverage
needs: [style, test]
Expand All @@ -85,17 +53,10 @@ jobs:
uses: actions/checkout@v2

- name: Install stable toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true

- name: Run cargo-tarpaulin
uses: actions-rs/tarpaulin@v0.1
with:
version: '0.15.0'
args: '-- --test-threads 1'

uses: dtolnay/rust-toolchain@stable
- run: cargo install cargo-tarpaulin
- run: cargo tarpaulin

- name: Upload to codecov.io
uses: codecov/codecov-action@v3.1.4
with:
Expand All @@ -105,4 +66,4 @@ jobs:
uses: actions/upload-artifact@v3
with:
name: code-coverage-report
path: cobertura.xml
path: cobertura.xml

0 comments on commit 1bb95bf

Please sign in to comment.