publish #198
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: Operator Tests | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
on: | |
pull_request: | |
workflow_call: | |
workflow_dispatch: | |
jobs: | |
build: | |
name: Build rock | |
uses: canonical/data-platform-workflows/.github/workflows/build_rock.yaml@v16 | |
integration: | |
runs-on: [self-hosted, linux, X64, jammy, large] | |
timeout-minutes: 120 | |
needs: build | |
strategy: | |
matrix: | |
env: [integration, ha-integration, tls-integration] | |
fail-fast: false | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Setup operator environment | |
uses: charmed-kubernetes/actions-operator@main | |
with: | |
provider: microk8s | |
channel: "1.29-strict/stable" | |
bootstrap-constraints: "cores=2 mem=2G" | |
juju-channel: 3.4/stable | |
# This is needed until | |
# https://bugs.launchpad.net/juju/+bug/1977582 is fixed | |
bootstrap-options: "--agent-version 3.4.4" | |
- name: Install rockcraft | |
run: | | |
sudo snap install rockcraft --classic | |
- name: Download rock package(s) | |
uses: actions/download-artifact@v4 | |
with: | |
pattern: ${{ needs.build.outputs.artifact-prefix }}-* | |
merge-multiple: true | |
- name: Install tox & poetry | |
run: | | |
sudo apt-get update | |
sudo apt-get install python3-pip python3-venv -y --no-install-recommends | |
python3 -m pip install --user pipx | |
python3 -m pipx ensurepath | |
pipx install tox | |
pipx install poetry | |
pipx install charmcraftcache | |
pipx inject poetry poetry-plugin-export | |
poetry config warnings.export false | |
- name: Integration Tests | |
run: | | |
sg snap_microk8s -c "tox -e ${{ matrix.env }}" | |
- name: Free disk space | |
run: | | |
echo "Free disk space after int tests" | |
df -T | |
# free space in the runner | |
rockcraft clean | |
sudo rm -rf /usr/share/dotnet | |
sudo rm -rf /opt/ghc | |
sudo rm -rf /usr/local/share/boost | |
sudo rm -rf "$AGENT_TOOLSDIRECTORY" | |
echo "Free disk after int tests" | |
df -T |