Repository navigation
113 lines (92 loc) · 3.08 KB
/
Copy pathci.yml
File metadata and controls
113 lines (92 loc) · 3.08 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
113
name: CI
on:
pull_request:
types: [opened, synchronize, reopened]
push:
branches: [main]
schedule:
- cron: 0 0 * * 0
permissions:
contents: read
jobs:
build-and-test:
strategy:
fail-fast: false
matrix:
version:
- stable
- 1.61.0 # MSRV
name: ${{ matrix.version }}
runs-on: ubuntu-latest
steps:
- name: checkout source
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: install Rust
uses: actions-rust-lang/setup-rust-toolchain@ecabd13d1c56bd1345c230e542e9144811ad706f # v2.0.0
with:
toolchain: ${{ matrix.version }}
- name: install cargo-hack
uses: taiki-e/install-action@9983c65e42da123ff25d1f78505eb6de315aa172 # v2.87.20
with:
tool: cargo-hack
- name: install cargo-nextest
uses: taiki-e/install-action@9983c65e42da123ff25d1f78505eb6de315aa172 # v2.87.20
with:
tool: cargo-nextest
- name: test
run: cargo hack --feature-powerset nextest run --workspace
linting:
if: ${{ github.ref != 'main' }}
runs-on: ubuntu-latest
permissions:
checks: write
contents: read
steps:
- name: checkout source
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: install Rust
uses: actions-rust-lang/setup-rust-toolchain@ecabd13d1c56bd1345c230e542e9144811ad706f # v2.0.0
with: { components: rustfmt, clippy }
- name: format
run: cargo fmt --all -- --check
- name: clippy
uses: giraffate/clippy-action@13b9d32482f25d29ead141b79e7e04e7900281e0 # v1.0.1
with:
clippy_flags: -- -D warnings
github_token: ${{ secrets.GITHUB_TOKEN }}
reporter: github-pr-check
minimal-versions:
runs-on: ubuntu-latest
steps:
- name: checkout source
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: install Rust
uses: actions-rust-lang/setup-rust-toolchain@ecabd13d1c56bd1345c230e542e9144811ad706f # v2.0.0
with: { toolchain: nightly }
- name: install cargo-hack
uses: taiki-e/install-action@9983c65e42da123ff25d1f78505eb6de315aa172 # v2.87.20
with:
tool: cargo-hack
- name: install cargo-minimal-versions
uses: taiki-e/install-action@9983c65e42da123ff25d1f78505eb6de315aa172 # v2.87.20
with:
tool: cargo-minimal-versions
- name: minimal version check
run: cargo minimal-versions check --workspace
zizmor:
name: GitHub Actions Security
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: zizmorcore/zizmor-action@cc914d7f3750a2d13d75c7f184a1060aa0e9d482 # v0.6.4
with:
advanced-security: false
annotations: true