-
Notifications
You must be signed in to change notification settings - Fork 37
61 lines (59 loc) · 2.12 KB
/
testCode.yml
File metadata and controls
61 lines (59 loc) · 2.12 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
name: Test validation and transform code
on:
push:
branches: [ master ]
paths-ignore:
- addons/**
pull_request:
branches: [ master ]
paths-ignore:
- addons/**
jobs:
testAllCode:
runs-on: windows-latest
strategy:
matrix:
python-version: [3.13]
steps:
- name: Install the latest version of uv
uses: astral-sh/setup-uv@v6
- name: Checkout code
uses: actions/checkout@v5
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
architecture: x64
- name: Run unit tests for transform and validation
shell: cmd
run: .\rununittests.bat
- name: Run pyright for validation
run: uv run --group lint --directory validation pyright --threads --level warning
- name: Run pyright for transform
run: uv run --group lint --directory transform pyright --threads --level warning
testValidationCode:
defaults:
run:
shell: cmd
working-directory: validation
runs-on: windows-latest
strategy:
matrix:
python-version: [3.13]
steps:
- name: Install the latest version of uv
uses: astral-sh/setup-uv@v6
- name: Checkout code
uses: actions/checkout@v5
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
architecture: x64
- name: Validate metadata
# E2E: test to check the script can be run, no need to actually test the file.
# The internal checks are covered with unit tests.
run: .\runvalidate.bat --dry-run tests/testData/addons/fake/13.0.0.json tests/testData/nvdaAPIVersions.json
- name: Generate json file
# E2E: test to check the script can be run
run: .\runcreatejson.bat -f tests/testData/fake.nvda-addon --dir tests/testOutput/test_runcreatejson --channel=stable --publisher=fakepublisher --sourceUrl=https://github.com/fake/ --url=https://github.com/fake.nvda-addon --licName="GPL v2" --licUrl="https://www.gnu.org/licenses/gpl-2.0.html"