From 49f3a21d3b14b077195066c19f6f301bd00723f6 Mon Sep 17 00:00:00 2001 From: Ashley James Date: Thu, 12 Oct 2023 00:05:48 +0530 Subject: [PATCH] Adopt juju 3.1 (#39) --- .github/workflows/check.yaml | 32 ++++++++++++++++++++++++++++++++ .github/workflows/pr.yaml | 24 ------------------------ .github/workflows/sonar.yaml | 6 +++--- 3 files changed, 35 insertions(+), 27 deletions(-) create mode 100644 .github/workflows/check.yaml delete mode 100644 .github/workflows/pr.yaml diff --git a/.github/workflows/check.yaml b/.github/workflows/check.yaml new file mode 100644 index 0000000..7d23ccc --- /dev/null +++ b/.github/workflows/check.yaml @@ -0,0 +1,32 @@ +name: Check workflow running linter, unit and functional tests + +on: + workflow_call: + pull_request: + types: [opened, synchronize, reopened] + branches: [master, main] + paths-ignore: + - "**.md" + - "**.rst" + +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 }} + tox-version: "<4" + + func: + uses: canonical/bootstack-actions/.github/workflows/func.yaml@v2 + needs: lint-unit + with: + command: make functional + juju-channel: "3.1/stable" + nested-containers: true + python-version: "3.10" + timeout-minutes: 60 + tox-version: "<4" diff --git a/.github/workflows/pr.yaml b/.github/workflows/pr.yaml deleted file mode 100644 index bffeacb..0000000 --- a/.github/workflows/pr.yaml +++ /dev/null @@ -1,24 +0,0 @@ -# This is a template `pr.yaml` file for snaps -# This file is managed by bootstack-charms-spec and should not be modified -# within individual snap repos. https://launchpad.net/bootstack-charms-spec - -name: PR workflow running lint checkers, unit and functional tests - -on: - pull_request: - types: [ opened, synchronize, reopened ] - branches: [ master, main ] - paths-ignore: - - '**.md' - - '**.rst' - -jobs: - pr: - uses: canonical/bootstack-actions/.github/workflows/pull-request.yaml@main - secrets: inherit - with: - python-version-unit: "['3.8', '3.10']" - python-version-func: "3.10" - tox-version: "<4" - snapcraft: true - commands: "['make functional']" diff --git a/.github/workflows/sonar.yaml b/.github/workflows/sonar.yaml index 506cdfd..e002bbb 100644 --- a/.github/workflows/sonar.yaml +++ b/.github/workflows/sonar.yaml @@ -5,8 +5,8 @@ name: SonarCloud on: workflow_run: - workflows: - - PR workflow running lint checkers, unit and functional tests + workflows: + - Check workflow running linter, unit and functional tests types: [completed] jobs: @@ -14,4 +14,4 @@ jobs: uses: canonical/bootstack-actions/.github/workflows/sonar.yaml@main secrets: inherit with: - workflow-name: PR workflow running lint checkers, unit and functional tests + workflow-name: Check workflow running linter, unit and functional tests