-
Notifications
You must be signed in to change notification settings - Fork 11
92 lines (75 loc) · 1.96 KB
/
ci.yaml
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
name: CI
on: [push, pull_request]
jobs:
linux:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- name: Rust formatting
step: cargo-fmt-check
- name: Rust linting
step: cargo-clippy
- name: Rust tests
step: cargo-test
- name: Python formatting
step: black-check-all
- name: Python import sorting
step: isort-check-all
- name: Python type checking
step: mypy-check-all
- name: Python linting
step: pylint-check-all
- name: Python unit tests
step: pytest-check-all
- name: Powershell static analysis
step: PSScriptAnalyzer-check-all
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version-file: "pyproject.toml"
- name: Setup Poetry
run: python3 -m pip install poetry
- name: Setup environment
run: ./setup
- name: ${{ matrix.name }}
env:
STEP: ${{ matrix.step }}
run: ./ci "${STEP}"
windows:
runs-on: windows-latest
strategy:
matrix:
include:
- name: Rust formatting
step: cargo-fmt-check
- name: Rust linting
step: cargo-clippy
- name: Rust tests
step: cargo-test
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: "Setup Rust"
uses: actions-rust-lang/[email protected]
with:
components: rustfmt, clippy
- name: ${{ matrix.name }}
env:
STEP: ${{ matrix.step }}
run: .\ci.ps1 $env:STEP
shell: powershell
check_success:
if: always()
needs:
- linux
- windows
runs-on: ubuntu-latest
steps:
- name: Decide whether the needed jobs succeeded or failed
uses: re-actors/alls-green@release/v1
with:
jobs: ${{ toJSON(needs) }}