Add arm64 run-on support #92
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: Check workflow running linter, unit and functional tests | |
on: | |
workflow_call: | |
workflow_dispatch: | |
pull_request: | |
types: [opened, synchronize, reopened] | |
branches: [master, main] | |
paths-ignore: | |
- "**.md" | |
- "**.rst" | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} | |
cancel-in-progress: true | |
jobs: | |
lint-unit: | |
uses: canonical/bootstack-actions/.github/workflows/lint-unit.yaml@v2 | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: ["3.8", "3.10"] | |
with: | |
python-version: ${{ matrix.python-version }} | |
working-directory: . | |
func: | |
needs: lint-unit | |
name: functional tests | |
runs-on: ${{ matrix.architecture.runs-on }} | |
timeout-minutes: 120 | |
strategy: | |
fail-fast: false | |
matrix: | |
juju-channel: ["3.4/stable"] | |
architecture: | |
- runs-on: [ubuntu-latest] # github hosted runners are amd64 | |
model-constraints: "" | |
- runs-on: [self-hosted, jammy, ARM64, medium] | |
model-constraints: arch=arm64 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Setup Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.10" | |
- name: Setup Juju environment | |
uses: charmed-kubernetes/actions-operator@main | |
with: | |
provider: "lxd" | |
juju-channel: ${{ matrix.juju-channel }} | |
charmcraft-channel: "2.x/stable" | |
- name: Install latest tox version | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install tox | |
- name: Install kvm support | |
run: | | |
sudo apt install -y qemu-kvm libvirt-daemon bridge-utils | |
- name: Show juju information | |
run: | | |
juju version | |
juju controllers | grep Version -A 1 | awk '{print $9}' | |
- name: Run tests | |
run: "make functional" | |
env: | |
TEST_JUJU3: "1" # https://github.com/openstack-charmers/zaza/pull/653 | |
TEST_MODEL_CONSTRAINTS: ${{ matrix.architecture.model-constraints }} | |
- name: debug juju model | |
if: always() | |
run: | | |
sudo apt install -y jq | |
juju models | |
juju switch "$(juju models --format json | jq -r '.models[].name' | grep zaza)" | |
juju status | |
juju debug-log --replay | |