-
Notifications
You must be signed in to change notification settings - Fork 0
77 lines (67 loc) · 2.34 KB
/
Copy pathtest-e2e.yml
File metadata and controls
77 lines (67 loc) · 2.34 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
name: End-to-End Test
on:
workflow_call:
inputs:
new-release-detected:
required: true
type: string
distribution-artifacts-name:
required: true
type: string
distribution-artifacts-dir:
required: true
type: string
package-name:
required: true
type: string
distribution-file-incipit:
required: true
type: string
test-dependency-group:
required: true
type: string
run-test-command:
required: true
type: string
jobs:
test-e2e:
name: End-to-End Test
runs-on: ubuntu-latest
steps:
- !step
name: Setup | Checkout Repository
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
ref: ${{ github.sha }}
fetch-depth: 1
- !step
name: Setup | Download Distribution Artifacts
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0
if: ${{ inputs.new-release-detected == 'true' }}
id: artifact-download
with:
name: ${{ inputs.distribution-artifacts-name }}
path: ${{ inputs.distribution-artifacts-dir }}
- !step
name: Setup | Install Python
uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0
with:
python-version-file: .python-version
- !step
name: Setup | Install uv
uses: astral-sh/setup-uv@eb1897b8dc4b5d5bfe39a428a8f2304605e0983c # v7.0.0
- name: Setup | Install Project Dependencies for Test
env:
UV_NO_MANAGED_PYTHON: true
run: uv sync --group ${{ inputs.test-dependency-group }}
- name: Setup | Install distribution artifact
if: ${{ steps.artifact-download.outcome == 'success' }}
run: |
uv pip uninstall ${{ inputs.package-name }}
uv pip install ${{ inputs.distribution-artifacts-dir}}/${{ inputs.distribution-file-incipit }}-*.whl
- name: Test | Run pytest
run: ${{ inputs.run-test-command }}
- name: Test | Run End-to-End App Test
run: ./tests/e2e_test_app.py
- name: Test | Check End-to-End Test Results
run: [ "$(wc -l < e2e-test-app-stderr.log)" -eq 3 ] && [ "$(wc -l < e2e-test-logfile.log)" -eq 3 ] && [ ! -s "e2e-test-logfile_root.log" ]