Repository navigation
Expand file tree
/
Copy pathaction.yml
More file actions
84 lines (79 loc) · 3.19 KB
/
Copy pathaction.yml
File metadata and controls
84 lines (79 loc) · 3.19 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
name: Check quality
description: Run NVX linting, typing, and formatting checks
runs:
using: composite
steps:
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: "3.10"
cache: pip
cache-dependency-path: requirements-dev.txt
- name: Install development tools
shell: bash
run: python -m pip install --requirement requirements-dev.txt
- name: Check code quality
shell: bash
env:
SHELLCHECK: >-
docker run --rm --volume ${{ github.workspace }}:/workspace:ro
--workdir /workspace
koalaman/shellcheck-alpine@sha256:9955be09ea7f0dbf7ae942ac1f2094355bb30d96fffba0ec09f5432207544002
shellcheck
SHFMT: >-
docker run --rm --volume ${{ github.workspace }}:/workspace:ro
--workdir /workspace
mvdan/shfmt@sha256:307d265ffd25ce832899ae17c93ed5062fc3375c514bba8f52cbf52792735c4d
run: |
set -euo pipefail
python -m ruff check scripts .github/specula
python -m compileall -q .github/specula
${SHELLCHECK} --shell=sh \
guest/common/init guest/alpine/nvx-container-enter \
guest/alpine/nvx-container-launch \
guest/common/nvx-hostmount guest/common/nvx-identity-probe \
guest/common/nvx-init-agent \
guest/common/nvx-container-enter-azurelinux \
guest/common/nvx-container-launch-azurelinux \
guest/common/nvx-sandbox-smoke guest/common/nvx-snapshot \
guest/common/nvx-virtio-restore-probe \
scripts/setup/setup-linux-mshv.sh \
scripts/setup/setup-linux-runner.sh
${SHELLCHECK} --shell=bash \
.github/specula/setup-runner.sh guest/ubuntu/nvx-bashrc
python -m pyright --pythonplatform Linux
python -m pyright --pythonplatform Windows
python -m ruff format --check scripts .github/specula
${SHFMT} -d -ln posix -i 4 -ci \
guest/common/init guest/alpine/nvx-container-enter \
guest/alpine/nvx-container-launch \
guest/common/nvx-hostmount guest/common/nvx-identity-probe \
guest/common/nvx-init-agent \
guest/common/nvx-container-enter-azurelinux \
guest/common/nvx-container-launch-azurelinux \
guest/common/nvx-sandbox-smoke guest/common/nvx-snapshot \
guest/common/nvx-virtio-restore-probe \
scripts/setup/setup-linux-mshv.sh \
scripts/setup/setup-linux-runner.sh
${SHFMT} -d -ln bash -i 4 -ci \
.github/specula/setup-runner.sh guest/ubuntu/nvx-bashrc
- name: Test Specula CI wiring
shell: bash
working-directory: .github/specula
run: PYTHONDONTWRITEBYTECODE=1 python3 -m unittest discover -s tests -q
- name: Check PowerShell syntax
shell: pwsh
run: |
$tokens = $null
$errors = $null
[void][System.Management.Automation.Language.Parser]::ParseFile(
(Resolve-Path "scripts/setup/setup-windows-whp.ps1"),
[ref]$tokens,
[ref]$errors
)
foreach ($error in $errors) {
Write-Error $error -ErrorAction Continue
}
if ($errors.Count -ne 0) {
exit 1
}