Run Integration Tests #96
Workflow file for this run
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: Run Integration Tests | |
on: | |
pull_request_review: | |
types: | |
- submitted | |
jobs: | |
load-matrix: | |
if: github.event.review.state == 'approved' && !startsWith(github.event.pull_request.title, 'docs:') | |
uses: ./.github/workflows/load-kind-versions.yaml | |
integration-tests: | |
if: github.event.review.state == 'approved' && !startsWith(github.event.pull_request.title, 'docs:') | |
needs: load-matrix | |
strategy: | |
matrix: | |
INITIUM_K8S_VERSION: ${{ fromJSON(needs.load-matrix.outputs.matrix) }} | |
runs-on: | |
labels: ubuntu-latest-4-cores | |
timeout-minutes: 15 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Integration test | |
run: | | |
# Install asdf and expose to PATH | |
git clone https://github.com/asdf-vm/asdf.git ~/.asdf --branch v0.10.2 | |
. $HOME/.asdf/asdf.sh | |
# Add asdf plugins and install tools in .tool-versions | |
make asdf_install | |
# Create a local branch to allow the next step to work | |
git checkout -b ci | |
# Deploy cluster | |
make ci | |
# Run tests | |
make integration-test | |
env: | |
GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
INITIUM_AOA_EXCLUDE_DEX: true | |
INITIUM_AOA_EXCLUDE_PROMETHEUSSTACK: true | |
INITIUM_AOA_EXCLUDE_OPENTELEMETRY: true | |
INITIUM_K8S_VERSION: ${{ matrix.INITIUM_K8S_VERSION }} | |
# https://github.com/orgs/community/discussions/26822#discussioncomment-5122101 | |
integration-tests-result: | |
if: github.event.review.state == 'approved' | |
runs-on: ubuntu-latest | |
name: Integration Tests | |
needs: [integration-tests] | |
steps: | |
- run: exit 1 | |
# see https://stackoverflow.com/a/67532120/4907315 | |
if: >- | |
${{ | |
contains(needs.*.result, 'failure') | |
|| contains(needs.*.result, 'cancelled') | |
}} |