-
Notifications
You must be signed in to change notification settings - Fork 12
47 lines (40 loc) · 1.5 KB
/
Copy pathbuild-python-package.yml
File metadata and controls
47 lines (40 loc) · 1.5 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
name: Build and smoke-test Python package
on:
workflow_call:
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
- name: Setup Python
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7
with:
python-version: "3.14"
- name: Build and check distributions
run: |
python -m pip install --upgrade pip
python -m pip install build twine
python -m build
python -m twine check dist/*
- name: Smoke test installed wheel
run: |
wheel="$(find dist -maxdepth 1 -name '*.whl' -print -quit)"
test -n "$wheel"
python -m venv "$RUNNER_TEMP/cds-wheel"
"$RUNNER_TEMP/cds-wheel/bin/python" -m pip install "$wheel"
cd "$RUNNER_TEMP"
"$RUNNER_TEMP/cds-wheel/bin/cds" --help
"$RUNNER_TEMP/cds-wheel/bin/cds" validate \
"$GITHUB_WORKSPACE/profiles/local-dagster-postgres-superset/profile.yaml"
"$RUNNER_TEMP/cds-wheel/bin/python" -c \
"from cli.security import _validate_rule_set; assert _validate_rule_set()['rules']"
- name: Upload immutable distributions
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
with:
name: python-package-distributions
path: dist/
if-no-files-found: error
retention-days: 7