-
Notifications
You must be signed in to change notification settings - Fork 37
60 lines (53 loc) · 2.09 KB
/
nightly_e2e.yml
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
name: nightly_e2e
on:
workflow_dispatch: {}
# schedule:
# - cron: 0 0 * * 1
jobs:
e2e:
runs-on: ubuntu-latest
if: ${{ github.event_name != 'pull_request' && github.repository_owner == 'liquidmetal-dev' }}
env:
PROJECT_NAME: "flintlock_nightly_e2e"
name: e2e tests
steps:
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
- name: Get branch name
id: branch-name
uses: tj-actions/branch-names@6871f53176ad61624f978536bbf089c574dc19a2 # v8.0.1
- name: Run tests
env:
METAL_AUTH_TOKEN: ${{ secrets.METAL_AUTH_TOKEN }}
run: |
pip3 install -r test/tools/requirements.txt
cat <<'EOF' >> e2e-config.yaml
---
org_id: ${{ secrets.EQUINIX_ORG_ID }}
project_name: ${{ env.PROJECT_NAME }}
repo:
branch: ${{ steps.branch-name.outputs.current_branch }}
EOF
test/tools/run.py run-e2e -c e2e-config.yaml
- name: Notify slack on failure
uses: actions-ecosystem/action-slack-notifier@fc778468d09c43a6f4d1b8cccaca59766656996a # v1.1.0
if: ${{ failure() }}
with:
slack_token: ${{ secrets.SLACK_TOKEN }}
message: "A flintlock integration test run failed :sad-parrot: <https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}|Click here> and weep."
channel: liquid-metal-dev
color: red
verbose: false
- name: Notify slack on success
uses: actions-ecosystem/action-slack-notifier@fc778468d09c43a6f4d1b8cccaca59766656996a # v1.1.0
if: ${{ success() }}
with:
slack_token: ${{ secrets.SLACK_TOKEN }}
message: "A flintlock integration test run succeeded :party-gopher:"
channel: liquid-metal-dev
color: green
verbose: false
- name: Cleanup project
uses: weaveworks/metal-janitor-action@27a0594c5c92d85585b553fc0c5ef2a3de7bec95 # main
with:
metal_auth_token: ${{ secrets.METAL_AUTH_TOKEN }}
project_names: ${{ env.PROJECT_NAME }}