-
Notifications
You must be signed in to change notification settings - Fork 13
112 lines (105 loc) · 3.12 KB
/
ci.yml
File metadata and controls
112 lines (105 loc) · 3.12 KB
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
103
104
105
106
107
108
109
110
111
112
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
lint:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/base
with:
ssh-key: ${{ secrets.HEGEL_DEPLOY_KEY }}
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
- uses: Swatinem/rust-cache@v2
- run: cargo fmt --check
- run: cargo clippy --all-features -- -D warnings
test:
name: tests (${{ matrix.rust }})
runs-on: ubuntu-latest
strategy:
matrix:
# keep this in sync with the rust-version in cargo.toml
rust: ["1.68", stable]
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/base
with:
ssh-key: ${{ secrets.HEGEL_DEPLOY_KEY }}
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust }}
- uses: Swatinem/rust-cache@v2
- run: cargo test
test-all-features:
name: tests (all features, ${{ matrix.rust }})
runs-on: ubuntu-latest
strategy:
matrix:
# keep this in sync with the rust-version in cargo.toml
rust: ["1.68", stable]
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/base
with:
ssh-key: ${{ secrets.HEGEL_DEPLOY_KEY }}
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust }}
- uses: Swatinem/rust-cache@v2
- run: cargo test --all-features
docs:
name: docs
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/base
with:
ssh-key: ${{ secrets.HEGEL_DEPLOY_KEY }}
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- run: cargo doc --all-features --no-deps
env:
RUSTDOCFLAGS: "-D warnings"
coverage:
name: coverage
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/base
with:
ssh-key: ${{ secrets.HEGEL_DEPLOY_KEY }}
- uses: dtolnay/rust-toolchain@stable
with:
components: llvm-tools-preview
- uses: Swatinem/rust-cache@v2
- run: cargo install cargo-llvm-cov
- run: cargo llvm-cov --all-features --fail-under-lines 30 --show-missing-lines
conformance:
name: conformance tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/base
with:
ssh-key: ${{ secrets.HEGEL_DEPLOY_KEY }}
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- uses: actions/setup-python@v5
with:
python-version: '3.13'
- name: Install hegel
run: |
pip install git+ssh://git@github.com/antithesishq/hegel.git@DRMacIver/new-protocol
pip install pytest
- name: Build conformance binaries
working-directory: tests/conformance/rust
run: cargo build --release
- name: Run conformance tests
working-directory: tests/conformance
run: pytest test_conformance.py -v