Skip to content

Commit 98fb1a5

Browse files
committed
New CI with 1.85
1 parent 35457b9 commit 98fb1a5

File tree

1 file changed

+52
-8
lines changed

1 file changed

+52
-8
lines changed

.github/workflows/rust.yml

Lines changed: 52 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,71 @@
11
name: Rust
22

3-
on: [push, pull_request]
3+
on:
4+
push:
5+
branches: ["main"]
6+
pull_request:
7+
branches: ["main"]
48

59
env:
610
CARGO_TERM_COLOR: always
711

812
jobs:
9-
build:
13+
lint:
1014
runs-on: ubuntu-latest
1115
steps:
1216
- uses: actions/checkout@v3
1317
- name: Check formatting
1418
run: cargo fmt -- --check
19+
- name: Run clippy
20+
run: cargo clippy
21+
22+
build:
23+
runs-on: ubuntu-latest
24+
needs: lint
25+
strategy:
26+
matrix:
27+
rust:
28+
- 1.85.0
29+
- stable
30+
- beta
31+
- nightly
32+
features:
33+
- ""
34+
- "--no-default-features"
35+
36+
steps:
37+
- name: Install rust (${{ matrix.rust }})
38+
uses: actions-rs/toolchain@v1
39+
with:
40+
toolchain: ${{ matrix.rust }}
41+
profile: minimal
42+
override: true
43+
- uses: actions/checkout@v3
1544
- name: Build
1645
run: cargo build --verbose
1746
- name: Run tests
1847
run: cargo test --verbose
1948
- name: Run examples
2049
working-directory: ./epserde
2150
run: for example in examples/*.rs ; do cargo run --example "$(basename "${example%.rs}")" ; done
22-
- name: Run clippy
23-
run: cargo clippy #-- -Dclippy::all -Dclippy::cargo
24-
- name: Switch to nightly toolchain
25-
run: rustup default nightly
26-
- name: Test with miri
27-
run: MIRIFLAGS="-Zmiri-disable-isolation" cargo test
51+
52+
coverage:
53+
needs: build
54+
name: coverage
55+
runs-on: ubuntu-latest
56+
container:
57+
image: xd009642/tarpaulin:develop-nightly
58+
options: --security-opt seccomp=unconfined
59+
steps:
60+
- name: Checkout repository
61+
uses: actions/checkout@v2
62+
63+
- name: Generate code coverage
64+
run: |
65+
cargo +nightly tarpaulin --verbose --engine llvm --all-features --workspace --out Lcov
66+
67+
- name: Coveralls
68+
uses: coverallsapp/github-action@v2
69+
with:
70+
github-token: ${{ secrets.GITHUB_TOKEN }}
71+
path-to-lcov: "lcov.info"

0 commit comments

Comments
 (0)