-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (41 loc) · 1.28 KB
/
continuous-integration.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
name: Continuous Integration
on:
pull_request:
push:
branches:
- main
paths:
- '.github/workflows/ci.yml'
- 'schemius/**'
- 'schemius-native/**'
- 'schemius-web/src/**'
- 'schemius-web/Cargo.toml'
jobs:
build-and-test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
toolchain: [stable, nightly]
steps:
- name: Set up Rust
run: |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain ${{ matrix.toolchain }}
cargo install cargo-tarpaulin
- name: Check Rust toolchain
run: rustup toolchain list
- name: Check out code
uses: actions/checkout@v4
- name: Build
run: cargo build --verbose
- name: Test
run: cargo test --verbose
- name: Generate code coverage
run: cargo tarpaulin --out lcov
if: matrix.toolchain == 'stable' && matrix.os == 'ubuntu-latest'
- name: Upload code coverage to Coveralls
uses: coverallsapp/github-action@v2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: ./lcov.info
if: matrix.os == 'ubuntu-latest' && matrix.toolchain == 'stable'