Skip to content

Move CI to actions that can be reused elsewhere #2

Move CI to actions that can be reused elsewhere

Move CI to actions that can be reused elsewhere #2

Workflow file for this run

name: Test Azimuth deployment
on:
pull_request:
types:
- opened
- synchronize
- ready_for_review
- reopened
branches:
- main
paths-ignore:
- 'docs/**'
concurrency:
group: ${{ 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 azimuth-images repo
run: exit ${{ github.repository == 'stackhpc/azimuth-config' && '0' || '1' }}
# This job exists so that draft PRs see the check as failed
fail_on_draft:
runs-on: ubuntu-latest
steps:
- name: PR must be marked as ready for review before tests will run
run: exit ${{ github.event.pull_request.draft && '1' || '0' }}
run_azimuth_tests:
needs: [fail_on_remote, fail_on_draft]
runs-on: ubuntu-latest
steps:
- name: Set up Azimuth environment
uses: ./.github/actions/setup
with:
# Make sure to check out the config version under test
config-ref: ${{ github.sha }}
os-clouds: ${{ secrets.CLOUD }}
environment-prefix: ci
- name: Provision Azimuth
uses: ./.github/actions/provision
- name: Run Azimuth tests
uses: ./.github/actions/test
- name: Destroy Azimuth
uses: ./.github/actions/destroy
if: ${{ always() }}