Repository navigation
66 lines (59 loc) · 2.33 KB
/
Copy pathci.yml
File metadata and controls
66 lines (59 loc) · 2.33 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
name: CI
on:
pull_request:
push:
jobs:
tests:
name: Tests (Python ${{ matrix.python-version }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.11", "3.12", "3.13", "3.14"]
steps:
- uses: actions/checkout@v7
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- name: Install Poetry
uses: snok/install-poetry@v1
with:
version: latest
- name: Install dependencies
run: poetry install --no-interaction
- name: Run pre-commit
run: poetry run pre-commit run --all-files
- name: Run tests
run: poetry run pytest
generator:
name: Generator (BuildingSync ${{ matrix.schema.name }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
schema:
- { name: "2.3", url: "https://github.com/BuildingSync/schema/releases/download/v2.3.0/BuildingSync.xsd" }
- { name: "2.4", url: "https://github.com/BuildingSync/schema/releases/download/v2.4.0/BuildingSync.xsd" }
- { name: "2.5", url: "https://github.com/BuildingSync/schema/releases/download/v2.5.0/BuildingSync.xsd" }
- { name: "2.6", url: "https://github.com/BuildingSync/schema/releases/download/v2.6.0/BuildingSync.xsd" }
- { name: "2.7", url: "https://github.com/BuildingSync/schema/releases/download/v2.7.0/BuildingSync.xsd" }
- { name: "develop-v2", url: "https://raw.githubusercontent.com/BuildingSync/schema/develop-v2/BuildingSync.xsd" }
- { name: "develop-v3", url: "https://raw.githubusercontent.com/BuildingSync/schema/develop-v3/BuildingSync.xsd" }
steps:
- uses: actions/checkout@v7
- uses: actions/setup-python@v6
with:
python-version: "3.14"
- name: Install Poetry
uses: snok/install-poetry@v1
with:
version: latest
- name: Install dependencies
run: poetry install --no-interaction
- name: Run generator
working-directory: bsyncpy
run: |
curl -fsSL -o BuildingSync-test.xsd "${{ matrix.schema.url }}"
poetry run python bsyncpy_generator.py BuildingSync-test.xsd
poetry run python -c "import bsync; bsync.BuildingSync()"