forked from mavlink/qgroundcontrol
-
Notifications
You must be signed in to change notification settings - Fork 0
126 lines (115 loc) · 3.23 KB
/
Copy pathci-scripts.yml
File metadata and controls
126 lines (115 loc) · 3.23 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
114
115
116
117
118
119
120
121
122
123
124
125
126
name: CI Scripts
on:
pull_request:
paths:
- '.github/scripts/**'
- '.github/actions/**'
- '.github/workflows/**'
- '.github/build-config.json'
- 'tools/setup/**'
- 'tools/*.py'
- 'tools/uv.lock'
- 'tools/tests/**'
- 'tools/common/**'
- 'tools/generators/**'
- 'tools/analyzers/**'
- 'tools/locators/**'
- 'tools/log-analyzer/**'
- 'tools/lsp/**'
- 'tools/simulation/**'
- 'tools/translations/**'
push:
branches:
- master
- 'Stable*'
paths:
- '.github/scripts/**'
- '.github/actions/**'
- '.github/workflows/**'
- '.github/build-config.json'
- 'tools/setup/**'
- 'tools/*.py'
- 'tools/uv.lock'
- 'tools/tests/**'
- 'tools/common/**'
- 'tools/generators/**'
- 'tools/analyzers/**'
- 'tools/locators/**'
- 'tools/log-analyzer/**'
- 'tools/lsp/**'
- 'tools/simulation/**'
- 'tools/translations/**'
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/master' }}
permissions:
contents: read
checks: write
jobs:
lint-workflows:
name: Lint Workflows
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Harden Runner
uses: step-security/harden-runner@v2
with:
egress-policy: audit
- name: Checkout
uses: actions/checkout@v6
with:
fetch-depth: 1
sparse-checkout: |
.github/.actionlint.yml
.github/workflows
.github/actions
sparse-checkout-cone-mode: false
- name: Run actionlint
uses: reviewdog/action-actionlint@v1
with:
actionlint_flags: -config-file .github/.actionlint.yml
reporter: github-pr-check
filter_mode: added
fail_level: error
level: warning
test-ci-scripts:
name: Test CI Scripts
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Harden Runner
uses: step-security/harden-runner@v2
with:
egress-policy: audit
- name: Checkout
uses: actions/checkout@v6
with:
fetch-depth: 1
sparse-checkout: |
.github/actions/setup-python
.github/build-config.json
.github/scripts
tools/pyproject.toml
tools/uv.lock
tools/*.py
tools/setup
tools/tests
tools/common
tools/generators
tools/analyzers
tools/locators
tools/log-analyzer
tools/lsp
tools/simulation
tools/translations
sparse-checkout-cone-mode: false
- name: Setup Python
uses: ./.github/actions/setup-python
with:
groups: scripts,test
python-version: '3.12'
- name: Python syntax smoke test
run: python3 -m compileall .github/scripts tools/*.py tools/setup tools/common tools/generators tools/analyzers tools/locators tools/log-analyzer tools/lsp tools/simulation tools/translations
- name: Run CI script tests
run: pytest -q tools/tests .github/scripts/tests