Repository navigation
91 lines (70 loc) · 2.78 KB
/
Copy pathci.yml
File metadata and controls
91 lines (70 loc) · 2.78 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
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
permissions:
contents: read
jobs:
quality:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v7
- name: Test initial publication guards
run: node --test scripts/initial-publish-context.test.mjs scripts/cargo-publish-context.test.mjs
- name: Install latest stable Rust toolchain
run: rustup toolchain install stable --profile minimal --component clippy,rustfmt,llvm-tools-preview
- name: Install WebAssembly target
run: rustup target add --toolchain stable wasm32-unknown-unknown
- name: Verify crates.io package
run: cargo +stable publish --dry-run --locked
- name: Read supported specification revision
id: specification
shell: bash
run: |
grep -Eq '^[0-9a-f]{40}$' tests/specification-revision
revision=$(tr -d '\n' < tests/specification-revision)
printf 'revision=%s\n' "$revision" >> "$GITHUB_OUTPUT"
- name: Check out canonical specification
uses: actions/checkout@v7
with:
repository: stack-sh/specification
ref: ${{ steps.specification.outputs.revision }}
path: .stack-specification
- name: Check formatting
run: cargo +stable fmt --check
- name: Run tests
run: cargo +stable test
- name: Run canonical conformance suite
env:
STACK_SPECIFICATION_DIR: .stack-specification
run: cargo +stable test --features conformance --test conformance --test language_intelligence_conformance
- name: Cross-build language intelligence for WebAssembly
run: cargo +stable build --lib --target wasm32-unknown-unknown --locked
- name: Run Clippy
run: cargo +stable clippy --all-targets --all-features -- -D warnings
- name: Build documentation
env:
RUSTDOCFLAGS: -D warnings
run: cargo +stable doc --no-deps
- name: Install cargo-llvm-cov
uses: taiki-e/install-action@e67fa11c4b9316fa714ddf0abed07a0c3143b95b # v2.87.4
with:
tool: cargo-llvm-cov@0.9.0
fallback: none
- name: Enforce unit-test coverage
run: cargo +stable llvm-cov --lib --all-features --workspace --fail-under-lines 95 --fail-under-functions 95 --fail-under-regions 95
msrv:
name: Minimum supported Rust
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v7
- name: Install Rust 1.85
run: rustup toolchain install 1.85.0 --profile minimal --component clippy
- name: Run tests
run: cargo +1.85.0 test
- name: Run Clippy
run: cargo +1.85.0 clippy --all-targets --all-features -- -D warnings