diff --git a/.github/workflows/test_integration_jaas.yaml b/.github/workflows/test_integration_jaas.yaml index 876ce036..52175c3f 100644 --- a/.github/workflows/test_integration_jaas.yaml +++ b/.github/workflows/test_integration_jaas.yaml @@ -18,6 +18,12 @@ on: - ".github/ISSUE_TEMPLATE/**" - ".github/PULL_REQUEST_TEMPLATE.md" workflow_dispatch: + inputs: + debug_enabled: + type: boolean + description: 'Run the build with tmate debugging enabled (https://github.com/marketplace/actions/debugging-with-tmate)' + required: false + default: false # Testing needs read permission and access to Github's container registry to pull JIMM. permissions: @@ -29,6 +35,7 @@ jobs: build: name: Build-JAAS runs-on: ubuntu-latest + # runs-on: [self-hosted, jammy, x64] timeout-minutes: 5 steps: - uses: actions/checkout@v4 @@ -41,6 +48,7 @@ jobs: test: name: Integration-JAAS needs: build + # runs-on: [self-hosted, jammy, x64] runs-on: ubuntu-latest strategy: fail-fast: false @@ -63,16 +71,22 @@ jobs: jimm-version: v3.1.10 juju-channel: 3/stable ghcr-pat: ${{ secrets.GITHUB_TOKEN }} + # Enable tmate debugging of manually-triggered workflows if the input option was provided + - name: Setup tmate session + uses: mxschmitt/action-tmate@v3 + if: ${{ github.event_name == 'workflow_dispatch' && inputs.debug_enabled }} - name: Setup microk8s for juju_kubernetes_cloud test run: | sudo snap install microk8s --channel=1.28-strict/stable sudo usermod -a -G snap_microk8s $USER sudo chown -R $USER ~/.kube - sudo microk8s.enable dns storage - sudo microk8s.enable dns local-storage + sudo microk8s.enable dns + sudo microk8s.enable storage + sudo microk8s.enable hostpath-storage sudo -g snap_microk8s -E microk8s status --wait-ready --timeout=600 + sudo microk8s.config view | tee /home/$USER/microk8s-config.yaml echo "MICROK8S_CONFIG<> $GITHUB_ENV - sudo microk8s.config view >> $GITHUB_ENV + echo "$(cat microk8s-config.yaml)" >> $GITHUB_ENV echo "EOF" >> $GITHUB_ENV - name: Create additional networks when testing with LXD run: |