-
Notifications
You must be signed in to change notification settings - Fork 0
67 lines (61 loc) · 1.7 KB
/
integration-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
name: Integration test for Rust
on:
push:
branches: main
paths: ['src/**', 'benches/**']
pull_request:
branches: main
paths: ['src/**', 'benches/**']
env:
MOLD_VERSION: 2.4.0
jobs:
cargo_fmt:
name: Cargo Format
runs-on: ubuntu-latest
timeout-minutes: ${{ (github.ref == 'refs/heads/express' && 1) || 60 }}
continue-on-error: ${{ github.ref == 'refs/heads/express' }}
steps:
- uses: actions/checkout@v4
- name: Add fmt
run: rustup component add rustfmt
- name: Run fmt
run: cargo fmt -- --check
cargo_clippy:
name: Cargo Clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo
- uses: rui314/setup-mold@v1
with:
mold-version: ${{ env.MOLD_VERSION }}
- name: Add clippy
run: rustup component add clippy
- name: Run clippy
run: cargo clippy
cargo_test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo
- uses: rui314/setup-mold@v1
with:
mold-version: ${{ env.MOLD_VERSION }}
- name: cargo test
run: cargo test