-
Notifications
You must be signed in to change notification settings - Fork 0
125 lines (102 loc) · 3.16 KB
/
Copy pathci.yml
File metadata and controls
125 lines (102 loc) · 3.16 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
name: CI
on:
push:
branches: [main]
pull_request:
workflow_dispatch:
permissions:
contents: read
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
name: Python ${{ matrix.python-version }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
python-version: ["3.11", "3.12", "3.13"]
steps:
- name: Check out repository
uses: actions/checkout@v6
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
cache: pip
cache-dependency-path: pyproject.toml
- name: Install SDK and test dependencies
run: python -m pip install --upgrade pip ".[dev,xml]"
- name: Run tests
run: python -m pytest
package:
name: Build Python package
needs: test
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v6
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: "3.12"
cache: pip
cache-dependency-path: pyproject.toml
- name: Install packaging tools
run: python -m pip install --upgrade pip build twine
- name: Build source distribution and wheel
run: python -m build
- name: Check package metadata
run: python -m twine check dist/*
- name: Install and import the built wheel
run: |
python -m pip install --force-reinstall dist/*.whl
python -c "import automationml; print(automationml.__file__)"
- name: Upload package artifacts
uses: actions/upload-artifact@v4
with:
name: automationml-python-package
path: dist/
if-no-files-found: error
opcua-acceptance:
name: OPC UA acceptance on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
steps:
- name: Check out repository
uses: actions/checkout@v6
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: "3.12"
cache: pip
cache-dependency-path: pyproject.toml
- name: Install OPC UA evaluation dependencies
run: python -m pip install --upgrade pip ".[xml,opcua-evaluation]"
- name: Require the strict release corpus
run: >-
python tools/compare_opcua_mappers.py
--manifest tests/opcua-comparison/release-manifest.json
--output-dir build/opcua-release
--engine PY-STRICT
--require-all
- name: Run quick deterministic scale gates
run: >-
python tools/benchmark_opcua_scale.py
--quick
--engine PY-STRICT
--repeats 1
--output-dir build/opcua-scale
- name: Upload OPC UA evidence
uses: actions/upload-artifact@v4
with:
name: opcua-evidence-${{ matrix.os }}
path: |
build/opcua-release/
build/opcua-scale/
if-no-files-found: error