-
Notifications
You must be signed in to change notification settings - Fork 2
67 lines (55 loc) · 2.03 KB
/
trace-functional-tests.yml
File metadata and controls
67 lines (55 loc) · 2.03 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: trace-functional-tests
on:
workflow_dispatch:
schedule:
- cron: "0 3 * * *"
permissions:
contents: read
jobs:
trace-functional-tests:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- uses: "opensafely-core/setup-action@93841f27c28c75bf85b1a0a915e2391a06c6c8a6" # v1
with:
install-just: true
install-uv: true
cache: uv
- name: Install Node.js
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6
with:
node-version-file: ".node-version"
cache: "npm"
cache-dependency-path: package-lock.json
- name: Install node_modules
run: npm ci
- name: Build assets
run: npm run build
- name: Set up development environment
run: just devenv
- name: Run functional tests
id: run_test
run: |
HYPOTHESIS_MAX_EXAMPLES=100 just test -k functional --tracing retain-on-failure
- name: Upload trace artifact
if: failure()
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
with:
name: test-results-trace
path: test-results/**/trace.zip
- name: Notify slack of failures
if: failure()
uses: slackapi/slack-github-action@45a88b9581bfab2566dc881e2cd66d334e621e2c # v3.0.3
with:
errors: true
method: chat.postMessage
token: ${{ secrets.BENNETTBOT_SLACK_BOT_TOKEN }}
payload: |
channel: "C069YDR4NCA"
text: "Airlock functional tests failed: Download the trace at ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id}}"
blocks:
- type: section
text:
type: mrkdwn
text: ":warning: Airlock functional tests failed:warning:\nDownload the trace at ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id}}"