diff --git a/.github/workflows/check.yaml b/.github/workflows/check.yaml index e909742..6e63d8a 100644 --- a/.github/workflows/check.yaml +++ b/.github/workflows/check.yaml @@ -16,28 +16,62 @@ concurrency: jobs: lint-unit: - uses: canonical/bootstack-actions/.github/workflows/lint-unit.yaml@v2 + name: Lint checkers and Unit tests + runs-on: ubuntu-latest strategy: fail-fast: false matrix: python-version: ["3.8", "3.10"] - with: - python-version: ${{ matrix.python-version }} + steps: + - uses: actions/checkout@v4 + with: + submodules: true + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + python -m pip install --upgrade pip + python -m pip install "tox" + - name: Run lint checkers working-directory: ./src + run: tox -e lint + - name: Run unit tests + working-directory: ./src + run: tox -e unit func: - uses: canonical/bootstack-actions/.github/workflows/func.yaml@v2 + name: Functional tests + runs-on: ubuntu-latest needs: lint-unit strategy: fail-fast: false matrix: - include: - - juju-channel: "3.4/stable" - command: "TEST_JUJU3=1 make functional" # using TEST_JUJU3 due https://github.com/openstack-charmers/zaza/commit/af7eea953dd5d74d3d074fe67b5765dca3911ca6 - with: - command: ${{ matrix.command }} - juju-channel: ${{ matrix.juju-channel }} - nested-containers: false - provider: "lxd" - python-version: "3.10" - timeout-minutes: 120 + juju-channel: ["3.4/stable"] + timeout-minutes: 120 + steps: + - uses: actions/checkout@v4 + with: + submodules: true + - name: Setup Python + uses: actions/setup-python@v5 + with: + python-version: "3.10" + - name: Install tox + run: | + python -m pip install --upgrade pip + python -m pip install "tox" + - name: Setup Juju ${{ matrix.juju-channel }} environment + uses: charmed-kubernetes/actions-operator@main + with: + provider: "lxd" + juju-channel: ${{ matrix.juju-channel }} + - name: Remove tox install by actions-operator + run: sudo apt remove tox -y + - name: Show juju information + run: | + juju version + juju controllers | grep Version -A 1 | awk '{print $9}' + - name: Run tests with `make functional` + run: "TEST_JUJU3=1 make functional" # using TEST_JUJU3 due https://github.com/openstack-charmers/zaza/commit/af7eea953dd5d74d3d074fe67b5765dca3911ca6 diff --git a/.github/workflows/issues_to_jira.yaml b/.github/workflows/issues_to_jira.yaml deleted file mode 100644 index cc44534..0000000 --- a/.github/workflows/issues_to_jira.yaml +++ /dev/null @@ -1,25 +0,0 @@ -# This is a template `issues_to_jira.yaml` file for ops charms -# This file is managed by bootstack-charms-spec and should not be modified -# within individual charm repos. https://launchpad.net/bootstack-charms-spec - -# This workflow requires to provide JIRA webhook URL via JIRA_URL GitHub Secret. -# -# Read more: -# https://support.atlassian.com/cloud-automation/docs/jira-automation-triggers/#Automationtriggers-Incomingwebhook -# -# Original code source: -# https://github.com/beliaev-maksim/github-to-jira-automation - -name: Issues to JIRA - -on: - issues: - # available via github.event.action - types: [opened, reopened, closed] - -jobs: - update: - name: Update Issue - uses: beliaev-maksim/github-to-jira-automation/.github/workflows/issues_to_jira.yaml@master - secrets: - JIRA_URL: ${{ secrets.JIRA_URL }} diff --git a/.github/workflows/sonar.yaml b/.github/workflows/sonar.yaml deleted file mode 100644 index 34c8d6f..0000000 --- a/.github/workflows/sonar.yaml +++ /dev/null @@ -1,17 +0,0 @@ -# This is a template `sonar.yaml` file for ops charms -# This file is managed by bootstack-charms-spec and should not be modified -# within individual charm repos. https://launchpad.net/bootstack-charms-spec - -name: SonarCloud -on: - workflow_run: - workflows: - - PR workflow running lint checkers, unit and functional tests - types: [completed] - -jobs: - sonar: - uses: canonical/bootstack-actions/.github/workflows/sonar.yaml@main - secrets: inherit - with: - workflow-name: PR workflow running lint checkers, unit and functional tests