From ebe822a3963de83c173fa26c6f8a7bd2d81b9ea0 Mon Sep 17 00:00:00 2001 From: Stamatis Katsaounis Date: Fri, 29 Mar 2024 12:33:40 +0200 Subject: [PATCH] ci: update CI with Observability actions --- .github/workflows/ci.yaml | 53 ----------------------------- .github/workflows/pull-request.yaml | 21 ++++++++++++ 2 files changed, 21 insertions(+), 53 deletions(-) delete mode 100644 .github/workflows/ci.yaml create mode 100644 .github/workflows/pull-request.yaml diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml deleted file mode 100644 index 2d3fc68..0000000 --- a/.github/workflows/ci.yaml +++ /dev/null @@ -1,53 +0,0 @@ -# Copyright 2024 Canonical Ltd. -# See LICENSE file for licensing details. -name: Unit testing - -on: - push: - branches: - - main - pull_request: - # Run checks on reopened draft PRs to support triggering PR checks on draft PRs that were opened - # by other workflows. - types: [opened, synchronize, reopened, ready_for_review] - -jobs: - maas-agent: - name: MAAS Agent unit test - runs-on: ubuntu-latest - timeout-minutes: 5 - defaults: - run: - working-directory: ./maas-agent - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Install tox - run: | - pipx install tox - - name: Run linter - run: tox run -e lint - - name: Run static checks - run: tox run -e static - - name: Run tests - run: tox run -e unit - - maas-region: - name: MAAS region unit test - runs-on: ubuntu-latest - timeout-minutes: 5 - defaults: - run: - working-directory: ./maas-region - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Install tox - run: | - pipx install tox - - name: Run linter - run: tox run -e lint - - name: Run static checks - run: tox run -e static - - name: Run tests - run: tox run -e unit diff --git a/.github/workflows/pull-request.yaml b/.github/workflows/pull-request.yaml new file mode 100644 index 0000000..37be865 --- /dev/null +++ b/.github/workflows/pull-request.yaml @@ -0,0 +1,21 @@ +name: Pull Requests + +on: + pull_request: + branches: + - main + +jobs: + pull-request-region: + name: PR Region + uses: canonical/observability/.github/workflows/charm-pull-request.yaml@main + secrets: inherit + inputs: + charm-path: maas-region + + pull-request-agent: + name: PR Agent + uses: canonical/observability/.github/workflows/charm-pull-request.yaml@main + secrets: inherit + inputs: + charm-path: maas-agent