-
Notifications
You must be signed in to change notification settings - Fork 7
80 lines (73 loc) · 3.05 KB
/
test-pr.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
78
79
80
name: Test Azimuth deployment
on:
pull_request:
types:
- opened
- synchronize
- ready_for_review
- reopened
branches:
- main
paths-ignore:
# Ignore any changes that are not actually code changes
- .gitignore
- CODEOWNERS
- LICENSE
- README.md
- .github/release.yml
- .github/workflows/update-dependencies.yml
# Ignore any changes that only affect the HA install
- playbooks/deploy_capi_mgmt.yml
- playbooks/provision_capi_mgmt.yml
- playbooks/restore.yml
- roles/capi_cluster/**
- roles/velero/**
# Use the head ref for workflow concurrency, with cancellation
# This should mean that any previous workflows for a PR get cancelled when a new commit is pushed
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref }}
cancel-in-progress: true
jobs:
# This job exists so that PRs from outside the main repo are rejected
fail_on_remote:
runs-on: ubuntu-latest
steps:
- name: PR must be from a branch in the stackhpc/ansible-collection-azimuth-ops repo
run: exit ${{ github.repository == 'stackhpc/ansible-collection-azimuth-ops' && '0' || '1' }}
run_azimuth_tests:
needs: [fail_on_remote]
runs-on: ubuntu-latest
steps:
# Check out the configuration repository
- name: Set up Azimuth environment
uses: stackhpc/azimuth-config/.github/actions/setup@devel
with:
os-clouds: ${{ secrets.OS_CLOUDS }}
environment-prefix: ops-ci
azimuth-ops-version: ${{ github.event.pull_request.head.sha }}
target-cloud: ${{ vars.TARGET_CLOUD }}
# Remove when https://github.com/stackhpc/azimuth-config/pull/129 merges
extra-vars: |
generate_tests_caas_default_test_case_enabled: false
generate_tests_caas_test_case_workstation_enabled: true
generate_tests_caas_test_case_slurm_enabled: true
generate_tests_caas_test_case_repo2docker_enabled: true
generate_tests_caas_test_case_rstudio_enabled: true
generate_tests_kubernetes_test_cases_latest_only: true
generate_tests_kubernetes_apps_default_test_case_enabled: false
generate_tests_kubernetes_apps_test_case_jupyterhub_enabled: true
generate_tests_kubernetes_apps_test_case_daskhub_enabled: true
# GitHub terminates jobs after 6 hours
# We don't want jobs to acquire the lock then get timed out before they can finish
# So wait a maximum of 3 hours to acquire the lock, leaving 3 hours for other tasks in the job
timeout-minutes: 180
# Provision Azimuth using the azimuth-ops version under test
- name: Provision Azimuth
uses: stackhpc/azimuth-config/.github/actions/provision@devel
# # Run the tests
- name: Run Azimuth tests
uses: stackhpc/azimuth-config/.github/actions/test@devel
# Tear down the environment
- name: Destroy Azimuth
uses: stackhpc/azimuth-config/.github/actions/destroy@devel
if: ${{ always() }}