-
Notifications
You must be signed in to change notification settings - Fork 11
77 lines (69 loc) · 2.36 KB
/
test-singlenode.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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
name: Single node test
on:
# Allow manual execution on any branch
workflow_dispatch:
# Execute by default on pull requests to the devel branch
pull_request:
types:
- opened
- synchronize
- ready_for_review
- reopened
branches:
- devel
# Only run the tests when something changes that affects us
paths:
- .gitattributes
- .gitignore
- requirements.txt
- requirements.yml
- .github/actions/**
- .github/workflows/test-singlenode.yml
- bin/**
- "!bin/ci-exec"
- "!bin/create-merge-branch"
- "!bin/tilt-*"
- environments/base/**
- environments/singlenode/**
- environments/demo/**
- environments/ci/**
jobs:
# This job exists so that PRs from outside the main repo are rejected
fail_on_remote:
runs-on: ubuntu-latest
steps:
- name: Code under test must be from a branch in the azimuth-config repo
run: exit ${{ github.repository == 'stackhpc/azimuth-config' && '0' || '1' }}
# We want jobs to wait in a queue for a slot to run, so as not to overload the test infra
# GitHub concurrency _almost_ does this, except the queue length is one :-(
# There is a feature request for what we need https://github.com/orgs/community/discussions/12835
# Until that is implemented, the only other viable option is a busy wait
wait_in_queue:
needs: [fail_on_remote]
if: ${{ github.event_name == 'workflow_dispatch' || !github.event.pull_request.draft }}
runs-on: ubuntu-latest
steps:
- name: Wait for an available slot
uses: stackhpc/github-actions/workflow-concurrency@master
with:
max-concurrency: 1
run_azimuth_tests:
needs: [wait_in_queue]
runs-on: ubuntu-latest
steps:
# We need to check out the code under test first in order to use local actions
- name: Checkout code under test
uses: actions/checkout@v3
- name: Set up Azimuth environment
uses: ./.github/actions/setup
with:
os-clouds: ${{ secrets.CLOUD }}
repository: ${{ github.repository }}
ref: ${{ github.ref }}
- name: Provision Azimuth
uses: ./.github/actions/provision
- name: Run Azimuth tests
uses: ./.github/actions/test
- name: Destroy Azimuth
uses: ./.github/actions/destroy
if: ${{ always() }}