Handle catalog items with no endpoints #49
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Integration tests | |
on: | |
# We use pull_request_target so that dependabot-created workflows can run | |
pull_request_target: | |
types: | |
- opened | |
- synchronize | |
- ready_for_review | |
- reopened | |
branches: | |
- main | |
# 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 | |
##### | |
# The easiest way to set up a management cluster, make sure all the required images are | |
# present and have an easy way to create Cluster API clusters using the janitor is to | |
# leverage the existing Azimuth test infrastructure | |
# | |
# TODO(mkjpryor): Change this in the future to use the CAPI management only variation | |
##### | |
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/cluster-api-janitor-openstack repo | |
run: exit ${{ github.event.pull_request.head.repo.full_name == 'stackhpc/cluster-api-janitor-openstack' && '0' || '1' }} | |
publish_artifacts: | |
needs: [fail_on_remote] | |
uses: ./.github/workflows/build-push-artifacts.yaml | |
with: | |
ref: ${{ github.event.pull_request.head.sha }} | |
secrets: inherit | |
# 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: [publish_artifacts] | |
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: [publish_artifacts, wait_in_queue] | |
runs-on: ubuntu-latest | |
steps: | |
# Check out the configuration repository | |
- name: Set up Azimuth environment | |
uses: stackhpc/azimuth-config/.github/actions/setup@main | |
with: | |
os-clouds: ${{ secrets.OS_CLOUDS }} | |
environment-prefix: janitor-ci | |
# Use the version of the chart that we just built | |
# We also don't need all the tests | |
# The Kubernetes test is sufficient to confirm the janitor is working | |
extra-vars: | | |
clusterapi_janitor_openstack_chart_version: ${{ needs.publish_artifacts.outputs.chart-version }} | |
generate_tests_caas_suite_enabled: false | |
generate_tests_kubernetes_apps_suite_enabled: false | |
# Provision Azimuth using the azimuth-ops version under test | |
- name: Provision Azimuth | |
uses: stackhpc/azimuth-config/.github/actions/provision@main | |
# # Run the tests | |
- name: Run Azimuth tests | |
uses: stackhpc/azimuth-config/.github/actions/test@main | |
# Tear down the environment | |
- name: Destroy Azimuth | |
uses: stackhpc/azimuth-config/.github/actions/destroy@main | |
if: ${{ always() }} |