Repository navigation
80 lines (73 loc) · 2.61 KB
/
Copy pathintegration.yaml
File metadata and controls
80 lines (73 loc) · 2.61 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
78
79
80
name: ops Integration Tests
on:
workflow_dispatch:
schedule:
- cron: '41 7 * * 1'
permissions: {}
jobs:
collect:
runs-on: ubuntu-latest
outputs:
tests: ${{ steps.tests.outputs.result }}
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: astral-sh/setup-uv@68559e99cc807c1eb7e9238fd43a15bba460eec2 # v10.3.3
- name: Collect integration test files
id: tests
run: |
set -xueo pipefail
result=$(
uv run --group integration pytest --collect-only -q --no-header test/integration \
| grep '::' \
| awk -F:: '{print $1}' \
| sort -u \
| jq -Rnc '[inputs]'
)
echo "result=$result" >> "$GITHUB_OUTPUT"
integration:
needs: [collect]
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
preset: ['k8s', 'machine']
juju-channel:
- 3/stable
- 4.0/stable
- 4.0/edge
- 4.1/edge
test: ${{ fromJson(needs.collect.outputs.tests) }}
exclude:
# tempo-coordinator-k8s only deploys on Kubernetes substrates.
- preset: machine
test: test/integration/test_tracing.py
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- run: sudo snap install --classic concierge
- run: >
sudo concierge prepare
--juju-channel=${{ matrix.juju-channel }}
-p ${{ matrix.preset }}
- uses: astral-sh/setup-uv@68559e99cc807c1eb7e9238fd43a15bba460eec2 # v10.3.3
- run: uv tool install tox --with tox-uv
- run: tox -e integration -- --log-cli-level=INFO -s "$MATRIX_TEST"
env:
MATRIX_TEST: ${{ matrix.test }}
# A backstop for Juju 4 getting stuck while destroying the model. The
# tracing tests each deploy the tempo stack into their own fresh
# model, so that file needs longer than the others.
timeout-minutes: ${{ matrix.test == 'test/integration/test_tracing.py' && 40 || 20 }}
open-issue-on-failure-if-scheduled:
if: ${{ failure() && github.event_name == 'schedule' }}
needs: [integration]
permissions:
issues: write
actions: read # for ai-failure-enrich.yaml
secrets:
# For ai-failure-enrich.yaml -- can only be read in the ai-failure-triage environment.
OPENROUTER_API_KEY: ${{ secrets.OPENROUTER_API_KEY }}
uses: $/.github/workflows/notify-scheduled-failure.yaml