Repository navigation
67 lines (63 loc) · 2.4 KB
/
Copy pathpython-package.yml
File metadata and controls
67 lines (63 loc) · 2.4 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
name: Python package
on:
push:
pull_request:
workflow_dispatch:
permissions:
contents: read
jobs:
launcher:
name: Launcher / Python ${{ matrix.python-version }}
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.11', '3.12']
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
persist-credentials: false
- uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7
with:
python-version: ${{ matrix.python-version }}
- name: Test launcher boundaries without installing dependencies
run: python tests/python_launcher.py
distributions:
name: Wheel, sdist, and installed Linux runtime
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
persist-credentials: false
- uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7
with:
python-version: '3.12'
- name: Install hash-locked packaging tools
run: |
python -m pip install --require-hashes --only-binary=:all: -r .github/requirements-packaging.txt
python -m pip check
- name: Install verified yq for runtime tests
env:
YQ_SHA256: 1bb99e1019e23de33c7e6afc23e93dad72aad6cf2cb03c797f068ea79814ddb0
run: |
set -euo pipefail
yq_binary="$(mktemp "${RUNNER_TEMP}/watchdog-python-yq.XXXXXX")"
trap 'rm -f -- "$yq_binary"' EXIT
curl --fail --silent --show-error --location \
https://github.com/mikefarah/yq/releases/download/v4.47.2/yq_linux_amd64 \
--output "$yq_binary"
printf '%s %s\n' "$YQ_SHA256" "$yq_binary" | sha256sum --check -
sudo install -m 0755 "$yq_binary" /usr/local/bin/yq
- name: Build current runtime and Python distributions
run: |
bash scripts/build-watchdog.sh --check
python -m build --no-isolation
python -m twine check --strict dist/*
- name: Verify clean installs, rebuild, argv, signals, and exit codes
run: python tests/python_package.py
- uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
with:
name: python-distributions
path: dist/*
if-no-files-found: error
retention-days: 7