Repository navigation
74 lines (70 loc) · 2.49 KB
/
Copy pathtest.yml
File metadata and controls
74 lines (70 loc) · 2.49 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
name: Fable source CI
on:
push:
branches: [main, master]
pull_request:
branches: [main, master]
permissions:
contents: read
jobs:
lint-and-syntax:
name: "Code Quality & Security Probes"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5.4.0
with:
python-version: '3.12'
cache: 'pip'
- name: Install build tooling & static security tools
run: |
python -m pip install --upgrade pip
python -m pip install setuptools==75.8.0 wheel==0.45.1
python -m pip install -e .
- name: Run Static AST & Bytecode Policy Checks
run: |
python run_tests.py --policy-only
- name: Shell script validation
shell: bash
run: |
sh -n install.sh
test-matrix:
name: "test-${{ matrix.os }}-py${{ matrix.python }}"
needs: [lint-and-syntax]
runs-on: "${{ matrix.os }}"
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python: ['3.10', '3.11', '3.12']
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5.4.0
with:
python-version: '${{ matrix.python }}'
cache: 'pip'
- name: Install dependencies and editable package
run: |
python -m pip install --upgrade pip
python -m pip install setuptools==75.8.0 wheel==0.45.1
python -m pip install -e .
- name: Run Test Suites
run: |
python run_tests.py --suite-only
- name: Validate shell wrapper and dry-run
if: "${{ runner.os != 'Windows' }}"
shell: bash
run: |
./install.sh --dry-run --yes
- name: Validate PowerShell syntax & dry-run
if: "${{ runner.os == 'Windows' }}"
shell: pwsh
run: |
$errors = @(); foreach ($path in @('install.ps1', 'install-antigravity.ps1')) {
$tokens = $null; $parse = $null
[System.Management.Automation.Language.Parser]::ParseFile((Join-Path $PWD $path), [ref]$tokens, [ref]$parse) | Out-Null
$errors += $parse
}
if ($errors.Count -gt 0) { $errors | Format-List *; exit 1 }
& ./install.ps1 -DryRun -Yes
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }