forked from huub-solver/huub
-
Notifications
You must be signed in to change notification settings - Fork 0
64 lines (61 loc) · 1.72 KB
/
test.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
name: Run Tests
on:
push:
branches:
- "develop"
pull_request:
workflow_dispatch:
env:
RUST_CHANNEL: "stable"
RUST_TEST_CHANNEL: "nightly"
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
steps:
- uses: actions/checkout@v4
- name: Install Rust toolchain
uses: moonrepo/setup-rust@v0
with:
cache: false
channel: ${{ env.RUST_TEST_CHANNEL }}
- name: cargo install cargo-llvm-cov
uses: taiki-e/install-action@cargo-llvm-cov
- name: Generate code coverage
run: cargo llvm-cov --all-features --workspace --codecov --output-path codecov.json
- uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: codecov.json
benchmarks:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install Rust toolchain and codspeed
uses: moonrepo/setup-rust@v0
with:
channel: ${{ env.RUST_CHANNEL }}
cache-target: bench
bins: cargo-codspeed
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Build the benchmark target(s)
run: cargo codspeed build --profile bench
- name: Run the benchmarks
uses: CodSpeedHQ/action@v3
with:
run: cargo codspeed run
token: ${{ secrets.CODSPEED_TOKEN }}
clippy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Rust toolchain and clippy
uses: moonrepo/setup-rust@v0
with:
channel: ${{ env.RUST_CHANNEL }}
components: clippy
- name: Run clippy
run: cargo clippy --tests -- -D warnings