Skip to content

Use self-hosted runners for integration tests #926

Use self-hosted runners for integration tests

Use self-hosted runners for integration tests #926

Workflow file for this run

# Copyright 2022 Canonical Ltd.
# See LICENSE file for licensing details.
name: Tests
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
on:
pull_request:
schedule:
- cron: '53 0 * * *' # Daily at 00:53 UTC
# Triggered on push to branch "main" by .github/workflows/release.yaml
workflow_call:
jobs:
lint:
name: Lint
uses: canonical/data-platform-workflows/.github/workflows/lint.yaml@v4.2.0
unit-test:
name: Unit test charm
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install tox & poetry
run: |
pipx install tox
pipx install poetry
- name: Run tests
run: tox run -e unit
build:
name: Build charm
uses: canonical/data-platform-workflows/.github/workflows/build_charms_with_cache.yaml@v4.2.0
with:
charmcraft-snap-revision: 1349 # version 2.3.0
permissions:
actions: write # Needed to manage GitHub Actions cache
integration-test:
name: Integration test charm
needs:
- lint
- unit-test
- build
uses: canonical/data-platform-workflows/.github/workflows/integration_test_charm.yaml@integration-test-k8s
with:
artifact-name: ${{ needs.build.outputs.artifact-name }}
cloud: microk8s
microk8s-snap-channel: latest/stable
juju-agent-version: 2.9.44
secrets:
integration-test: |
{
"AWS_ACCESS_KEY": "${{ secrets.AWS_ACCESS_KEY }}",
"AWS_SECRET_KEY": "${{ secrets.AWS_SECRET_KEY }}",
"GCP_ACCESS_KEY": "${{ secrets.GCP_ACCESS_KEY }}",
"GCP_SECRET_KEY": "${{ secrets.GCP_SECRET_KEY }}",
}
docker-hub-username: ${{ secrets.DOCKER_HUB_USERNAME }}
docker-hub-password: ${{ secrets.DOCKER_HUB_TOKEN }}