-
Notifications
You must be signed in to change notification settings - Fork 63
81 lines (71 loc) · 2.17 KB
/
ci.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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
name: CI
on:
push:
branches:
- master
pull_request:
branches:
- master
permissions:
contents: read
jobs:
Lint:
runs-on: ubuntu-latest
steps:
- name: Harden Runner
uses: step-security/harden-runner@1f99358870fe1c846a3ccba386cc2b2246836776
with:
disable-sudo: true
egress-policy: block
allowed-endpoints: >
github.com:443
static.rust-lang.org:443
- name: Checkout
uses: actions/checkout@61b9e3751b92087fd0b06925ba6dd6314e06f089
- name: Rust toolchain
uses: actions-rs/toolchain@16499b5e05bf2e26879000db0c1d13f7e13fa3af
with:
toolchain: stable
components: rustfmt
- name: Check Formatting
run: cargo fmt --check
Test:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: [3.9]
include:
- os: ubuntu-latest
python-version: "3.11"
- os: ubuntu-latest
python-version: "3.10"
- os: ubuntu-latest
python-version: 3.8
- os: ubuntu-latest
python-version: 3.7
runs-on: "${{ matrix.os }}"
steps:
- name: Harden Runner
uses: step-security/harden-runner@1f99358870fe1c846a3ccba386cc2b2246836776
with:
disable-sudo: true
egress-policy: block
allowed-endpoints: >
api.github.com:443
crates.io:443
files.pythonhosted.org:443
github.com:443
pypi.org:443
static.crates.io:443
index.crates.io:443
static.rust-lang.org:443
- uses: actions/checkout@61b9e3751b92087fd0b06925ba6dd6314e06f089
- uses: actions/setup-python@d27e3f3d7c64b4bbf8e4abfb9b63b83e846e0435 # 4.5.0
with:
python-version: ${{ matrix.python-version }}
- uses: actions-rs/toolchain@16499b5e05bf2e26879000db0c1d13f7e13fa3af
with:
toolchain: stable
- uses: Swatinem/rust-cache@6720f05bc48b77f96918929a9019fb2203ff71f8 # 2.0.0
- run: python3 -m pip install nox
- run: nox -s test-${{ matrix.python-version }}