-
Notifications
You must be signed in to change notification settings - Fork 0
59 lines (55 loc) · 1.84 KB
/
ci.yml
File metadata and controls
59 lines (55 loc) · 1.84 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
name: Build and Test
on:
merge_group:
pull_request:
branches:
- main
- dev
- 'feat/**'
- release-candidate
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
linux-test:
# Change to warp-ubuntu-latest-x64-16x for a more powerful runner (GitHub App must be enabled for this repo)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
with:
repository: argumentcomputer/ci-workflows
- uses: ./.github/actions/ci-env
- uses: actions/checkout@v5
- uses: dtolnay/rust-toolchain@stable
- uses: taiki-e/install-action@nextest
- uses: Swatinem/rust-cache@v2
- name: Linux Tests
run: |
cargo nextest run --profile ci --cargo-profile dev-ci --workspace
lints:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
with:
repository: argumentcomputer/ci-workflows
- uses: ./.github/actions/ci-env
- uses: actions/checkout@v5
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- name: Check Rustfmt code style
run: cargo fmt --all --check
- name: Check *everything* compiles
run: cargo check --all-targets --all-features --workspace
- name: Check clippy lints
run: cargo clippy --workspace --all-targets -- -D warnings
- name: Doctests
run: cargo test --doc --workspace
- name: Get Rust version
run: |
echo "RUST_VERSION=$(awk -F '"' '/^channel/ {print $2}' rust-toolchain.toml)" | tee -a $GITHUB_ENV
# Lint dependencies for licensing and auditing issues as per `deny.toml`
- name: Cargo-deny
uses: EmbarkStudios/cargo-deny-action@v2
with:
rust-version: ${{ env.RUST_VERSION }}