-
Notifications
You must be signed in to change notification settings - Fork 7
102 lines (94 loc) · 2.59 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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
name: Check
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
# `workflow_dispatch` allows CodSpeed to trigger backtest
# performance analysis in order to generate initial data.
workflow_dispatch:
env:
CARGO_TERM_COLOR: always
CI: true
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: setup toolchain
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
components: rustfmt, clippy
- uses: Swatinem/rust-cache@v2
# Required for compatibility unit tests
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Build
run: cargo build
- name: Run tests
env:
RUST_BACKTRACE: 1
run: cargo test
- name: rustfmt
run: make format-check
- name: clippy
run: make lint
compatibility-test-complete:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: true
- uses: Swatinem/rust-cache@v2
- name: setup toolchain
uses: hecrj/setup-rust-action@v2
with:
rust-version: stable
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Run Compatibility Tests
run: |
cargo run -p enderpy-compat --bin enderpy-compat
benchmarks:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Setup rust
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
- uses: Swatinem/rust-cache@v2
- name: Build the benchmark target(s)
run: |
cargo install cargo-codspeed --locked
cargo codspeed build --features codspeed
- name: Run the benchmarks
uses: CodSpeedHQ/action@v3
with:
run: cargo codspeed run
token: ${{ secrets.CODSPEED_TOKEN }}
# coverage:
# name: coverage
# runs-on: ubuntu-latest
# container:
# image: xd009642/tarpaulin:develop-nightly
# options: --security-opt seccomp=unconfined
# steps:
# - uses: actions/checkout@v4
# with:
# submodules: true
# - name: Generate code coverage
# run: |
# cargo +nightly tarpaulin --verbose --all-features --workspace --timeout 120 --out xml
# - name: Upload to codecov.io
# uses: codecov/codecov-action@v4
# with:
# token: ${{secrets.CODECOV_TOKEN}}
# fail_ci_if_error: false