-
-
Notifications
You must be signed in to change notification settings - Fork 16
70 lines (57 loc) · 2.02 KB
/
python-test-package.yml
File metadata and controls
70 lines (57 loc) · 2.02 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
name: Python Package Test
on:
workflow_call:
inputs:
project:
required: true
type: string
jobs:
test:
name: Test ${{ inputs.project }} Python Package
runs-on: ubuntu-latest
env:
NX_NO_CLOUD: true
permissions:
contents: read
steps:
- name: Checkout the monorepo
uses: actions/checkout@v6
- name: Setup Node v24
uses: actions/setup-node@v6
with:
node-version: 24
- name: Setup pnpm v10
uses: pnpm/action-setup@v4
with:
version: 10
run_install: false
- name: Get pnpm Store Path
id: pnpm-store
run: echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_OUTPUT
- name: Setup pnpm Cache
uses: actions/cache@v5
with:
path: ${{ steps.pnpm-store.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml', 'package.json') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install pnpm Dependencies
run: pnpm install
- name: Setup Python
uses: actions/setup-python@v6
with:
python-version: '3.12'
- name: Install uv
uses: astral-sh/setup-uv@v7
- name: Nx e2e ${{ inputs.project }}
run: pnpm nx e2e ${{ inputs.project }} --no-cloud
- name: Mark test passed
if: success()
run: echo "${{ inputs.project }}" > /tmp/test-result.txt
- name: Upload test result marker
if: success()
uses: actions/upload-artifact@v7
with:
name: test-passed-python-${{ inputs.project }}
path: /tmp/test-result.txt
retention-days: 1