-
-
Notifications
You must be signed in to change notification settings - Fork 4
87 lines (74 loc) · 2.1 KB
/
ci.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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
name: Continuous Integration
on:
push:
branches:
- '**'
tags:
- '!**' # Don't run twice on commits with tags
paths-ignore:
- 'helpers/**'
- 'docker/**'
- '.github/**'
- '**.Dockerfile'
- '**.md'
pull_request:
schedule:
- cron: '15 6 * * 2'
workflow_dispatch:
env:
CARGO_TERM_COLOR: always
jobs:
linux:
name: 'Test on Linux'
runs-on: ubuntu-latest
steps:
- name: Check out
uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
- name: Init Cache
uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Run Fmt, Clippy and Test
run: ./helpers/test.sh
- name: Install Cargo Coverage
uses: taiki-e/install-action@cargo-llvm-cov
- name: Cargo Coverage
run: cargo llvm-cov test --bins --all-features --tests --lcov --output-path ./lcov.info
- name: Upload Coverage
uses: codecov/codecov-action@v4
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
windows:
name: 'Test on Windows'
runs-on: windows-latest
steps:
- name: Check out
uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
- name: Init Cache
uses: actions/cache@v4
with:
path: |
C:\Users\runneradmin\.cargo\bin\
C:\Users\runneradmin\.cargo\registry\index\
C:\Users\runneradmin\.cargo\registry\cache\
C:\Users\runneradmin\.cargo\git\db\
target\
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Run Fmt, Clippy and Test
shell: pwsh
working-directory: ${{ env.GITHUB_WORKSPACE }}
run: .\helpers\test.ps1