Add integration test for reconcile interval and update interval config #51
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: Integration tests | |
on: | |
pull_request: | |
# Needed to prevent concurrency due to only one fork can exist under the same owner on GitHub. | |
concurrency: | |
group: github-runner-operator-${{ github.workflow }}-integration-tests-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
integration-test-charm-no-runner: | |
name: Integration test charm with no runner | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
juju: [3.1, 2.9] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup operator environment | |
uses: charmed-kubernetes/actions-operator@main | |
with: | |
juju-channel: ${{ matrix.juju }}/stable | |
provider: lxd | |
- name: Enable br_netfilter | |
run: sudo modprobe br_netfilter | |
- name: Run Integration tests | |
run: | | |
tox -e integration-juju${{ matrix.juju }} -- \ | |
--keep-models \ | |
--path ${{secrets.E2E_TESTING_REPO}} \ | |
--token ${{secrets.E2E_TESTING_TOKEN}} \ | |
--token-alt ${{secrets.E2E_TESTING_TOKEN_ALT}} \ | |
tests/integration/test_charm_no_runner.py | |
integration-test-charm: | |
name: Integration test charm | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
juju: [3.1, 2.9] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup operator environment | |
uses: charmed-kubernetes/actions-operator@main | |
with: | |
juju-channel: ${{ matrix.juju }}/stable | |
provider: lxd | |
- name: Enable br_netfilter | |
run: sudo modprobe br_netfilter | |
- name: Run Integration tests | |
run: | | |
tox -e integration-juju${{ matrix.juju }} -- \ | |
--keep-models \ | |
--path ${{secrets.E2E_TESTING_REPO}} \ | |
--token ${{secrets.E2E_TESTING_TOKEN}} \ | |
--token-alt ${{secrets.E2E_TESTING_TOKEN_ALT}} \ | |
tests/integration/test_charm.py | |
integration-test-charm-fork-repo: | |
name: Integration test charm with fork repo | |
runs-on: ubuntu-latest | |
strategy: | |
max-parallel: 1 | |
matrix: | |
juju: [3.1, 2.9] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup operator environment | |
uses: charmed-kubernetes/actions-operator@main | |
with: | |
juju-channel: ${{ matrix.juju }}/stable | |
provider: lxd | |
- name: Enable br_netfilter | |
run: sudo modprobe br_netfilter | |
- name: Run Integration tests | |
run: | | |
tox -e integration-juju${{ matrix.juju }} -- \ | |
--keep-models \ | |
--path ${{secrets.E2E_TESTING_REPO}} \ | |
--token ${{secrets.E2E_TESTING_TOKEN}} \ | |
--token-alt ${{secrets.E2E_TESTING_TOKEN_ALT}} \ | |
tests/integration/test_charm_fork_repo.py | |
integration-test-charm-scheduled-events: | |
name: Integration test charm scheduled events | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
juju: [3.1, 2.9] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup operator environment | |
uses: charmed-kubernetes/actions-operator@main | |
with: | |
juju-channel: ${{ matrix.juju }}/stable | |
provider: lxd | |
- name: Enable br_netfilter | |
run: sudo modprobe br_netfilter | |
- name: Run Integration tests | |
run: | | |
tox -e integration-juju${{ matrix.juju }} -- \ | |
--keep-models \ | |
--path ${{secrets.E2E_TESTING_REPO}} \ | |
--token ${{secrets.E2E_TESTING_TOKEN}} \ | |
--token-alt ${{secrets.E2E_TESTING_TOKEN_ALT}} \ | |
tests/integration/test_charm_scheduled_events.py | |
required_status_checks: | |
name: Required Integration Test Status Checks | |
runs-on: ubuntu-latest | |
needs: | |
- integration-test-charm-no-runner | |
- integration-test-charm | |
- integration-test-charm-fork-repo | |
- integration-test-charm-scheduled-events | |
if: always() && !cancelled() | |
timeout-minutes: 30 | |
steps: | |
- run: | | |
[ '${{ needs.integration-test-charm-no-runner.result }}' = 'success' ] || (echo integration-test-charm-no-runner failed && false) | |
[ '${{ needs.integration-test-charm.result }}' = 'success' ] || (echo integration-test-charm failed && false) | |
[ '${{ needs.integration-test-charm-fork-repo.result }}' = 'success' ] || (echo integration-test-charm-fork-repo failed && false) | |
[ '${{ needs.integration-test-charm-scheduled-events.result }}' = 'success' ] || (echo integration-test-charm-schedule-events failed && false) |