Repository navigation
112 lines (91 loc) · 3.23 KB
/
Copy pathtest.yml
File metadata and controls
112 lines (91 loc) · 3.23 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
name: Test
on:
pull_request:
push:
branches:
- main
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Check out SDK
uses: actions/checkout@v7
- name: Check out OCLP standard
uses: actions/checkout@v7
with:
repository: EvanZ/open-computation-lifecycle
path: standard
- name: Check out OCLP profiles
uses: actions/checkout@v7
with:
repository: EvanZ/oclp-profiles
path: profiles
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: "3.12"
- name: Install uv
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
with:
version: "0.11.32"
enable-cache: false
- name: Install dependencies
run: uv sync --locked --group dev
- name: Test SDK and external conformance
run: OCLP_STANDARD_ROOT=standard OCLP_PROFILES_ROOT=profiles uv run pytest
- name: Lint SDK
run: uv run ruff check .
package-smoke-test:
name: Build and install package
runs-on: ubuntu-latest
steps:
- name: Check out SDK
uses: actions/checkout@v7
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: "3.12"
- name: Install uv
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
with:
version: "0.11.32"
enable-cache: false
- name: Build distribution artifacts
run: uv build
- name: Verify source distribution excludes generated example data
run: |
if tar -tzf dist/*.tar.gz | grep -Eq 'examples/bike-demand-service/data/|/\.venv'; then
echo "source distribution contains generated local files"
exit 1
fi
- name: Install each distribution into a clean environment
run: |
uv venv --clear .venv-wheel-smoke
uv pip install --python .venv-wheel-smoke/bin/python dist/*.whl
uv venv --clear .venv-sdist-smoke
uv pip install --python .venv-sdist-smoke/bin/python dist/*.tar.gz
- name: Run import and command-line smoke tests
run: |
.venv-wheel-smoke/bin/python -c "from oclp import Artifact, canonical_json_bytes; assert Artifact and canonical_json_bytes"
.venv-wheel-smoke/bin/oclp --help
.venv-sdist-smoke/bin/python -c "from oclp import Artifact, canonical_json_bytes; assert Artifact and canonical_json_bytes"
.venv-sdist-smoke/bin/oclp --help
dagster:
name: Test Dagster integration
runs-on: ubuntu-latest
steps:
- name: Check out SDK
uses: actions/checkout@v7
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: "3.12"
- name: Install uv
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
with:
version: "0.11.32"
enable-cache: false
- name: Install Dagster integration dependencies
run: uv sync --locked --group dev --extra dagster
- name: Test Dagster integration
run: uv run pytest tests/test_dagster_adapter.py tests/test_dagster_projection.py