|
8 | 8 | - .github/workflows/test.yml |
9 | 9 | - tap_pulumi_cloud/** |
10 | 10 | - tests/** |
11 | | - - noxfile.py |
12 | 11 | - pyproject.toml |
13 | 12 | - uv.lock |
14 | 13 | pull_request: |
15 | | - branches: [main] |
16 | | - types: [opened, synchronize, reopened] |
17 | 14 | paths: |
18 | 15 | - .github/workflows/constraints.txt |
19 | 16 | - .github/workflows/test.yml |
20 | 17 | - tap_pulumi_cloud/** |
21 | 18 | - tests/** |
22 | | - - noxfile.py |
23 | 19 | - pyproject.toml |
24 | 20 | - uv.lock |
| 21 | + workflow_dispatch: |
| 22 | + |
| 23 | +concurrency: |
| 24 | + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} |
| 25 | + cancel-in-progress: true |
| 26 | + |
| 27 | +permissions: |
| 28 | + contents: read |
| 29 | + |
| 30 | +env: |
| 31 | + FORCE_COLOR: 1 |
25 | 32 |
|
26 | 33 | jobs: |
| 34 | + build-package: |
| 35 | + name: Build & verify package |
| 36 | + runs-on: ubuntu-latest |
| 37 | + outputs: |
| 38 | + supported-python-versions: ${{ steps.baipp.outputs.supported_python_classifiers_json_array }} |
| 39 | + steps: |
| 40 | + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 |
| 41 | + with: |
| 42 | + fetch-depth: 0 |
| 43 | + persist-credentials: false |
| 44 | + - uses: hynek/build-and-inspect-python-package@f3d069d0f9a3c9169d1a483318bb0e09876a6fd6 # v2.15.0 |
| 45 | + id: baipp |
| 46 | + |
27 | 47 | test: |
| 48 | + name: Tests |
28 | 49 | runs-on: ubuntu-latest |
29 | | - env: |
30 | | - FORCE_COLOR: "1" |
31 | | - NOXSESSION: tests-${{ matrix.python-version }} |
32 | | - UV_CONSTRAINT: ${{ github.workspace }}/.github/workflows/constraints.txt |
33 | | - UV_PYTHON: ${{ matrix.python-version }} |
| 50 | + needs: [build-package] |
34 | 51 | strategy: |
35 | | - fail-fast: false |
| 52 | + fail-fast: true |
| 53 | + max-parallel: 1 |
36 | 54 | matrix: |
37 | | - python-version: |
38 | | - - "3.10" |
39 | | - - "3.11" |
40 | | - - "3.12" |
41 | | - - "3.13" |
42 | | - - "3.14" |
| 55 | + python-version: ${{ fromJson(needs.build-package.outputs.supported-python-versions) }} |
43 | 56 |
|
44 | 57 | steps: |
45 | 58 | - name: Checkout code |
46 | 59 | uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 |
47 | 60 | with: |
48 | | - fetch-depth: 0 |
| 61 | + persist-credentials: false |
49 | 62 |
|
50 | | - - name: Set up Python ${{ matrix.python-version }} |
51 | | - uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 |
| 63 | + - name: Install uv |
| 64 | + uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7.6.0 |
52 | 65 | with: |
53 | 66 | python-version: ${{ matrix.python-version }} |
54 | | - allow-prereleases: true |
55 | | - |
56 | | - - name: Install uv |
57 | | - uses: astral-sh/setup-uv@803947b9bd8e9f986429fa0c5a41c367cd732b41 # v7.2.1 |
58 | 67 |
|
59 | 68 | - name: Install Nox |
| 69 | + env: |
| 70 | + UV_CONSTRAINT: ${{ github.workspace }}/.github/workflows/constraints.txt |
60 | 71 | run: | |
61 | | - uv tool install nox |
62 | | - nox --version |
| 72 | + uv tool install --with tox-uv tox |
| 73 | + tox --version |
63 | 74 |
|
64 | 75 | - name: Run tests |
65 | 76 | env: |
66 | 77 | TAP_PULUMI_CLOUD_TOKEN: ${{ secrets.TAP_PULUMI_CLOUD_TOKEN }} |
67 | 78 | TAP_PULUMI_CLOUD_ORGANIZATIONS: ${{ secrets.TAP_PULUMI_CLOUD_ORGANIZATIONS }} |
68 | 79 | TAP_PULUMI_CLOUD_START_DATE: ${{ secrets.TAP_PULUMI_CLOUD_START_DATE }} |
| 80 | + PYTHON_VERSION: ${{ matrix.python-version }} |
69 | 81 | run: | |
70 | | - nox |
| 82 | + tox -e ${PYTHON_VERSION} |
| 83 | +
|
| 84 | + typing: |
| 85 | + name: Type Checking |
| 86 | + runs-on: ubuntu-latest |
| 87 | + steps: |
| 88 | + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 |
| 89 | + - name: Setup uv |
| 90 | + uses: astral-sh/setup-uv@6ee6290f1cbc4156c0bdd66691b2c144ef8df19a # v7.4.0 |
| 91 | + - name: Run Tox |
| 92 | + run: > |
| 93 | + uvx |
| 94 | + --managed-python |
| 95 | + --with=tox-uv |
| 96 | + tox -e typing |
0 commit comments