Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DPE-2804] Tweak tests #160

Merged
merged 8 commits into from
Oct 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 3 additions & 19 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
timeout-minutes: 5
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Install tox
# TODO: Consider replacing with custom image on self-hosted runner OR pinning version
run: python3 -m pip install tox
Expand All @@ -39,28 +39,13 @@ jobs:
timeout-minutes: 5
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Install tox
# TODO: Consider replacing with custom image on self-hosted runner OR pinning version
run: python3 -m pip install tox
- name: Run tests
run: tox run -e unit

lib-check:
name: Check libraries
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Check libs
uses: canonical/charming-actions/check-libraries@2.4.0
with:
credentials: "${{ secrets.CHARMHUB_TOKEN }}"
github-token: "${{ secrets.GITHUB_TOKEN }}"

build:
name: Build charms
uses: canonical/data-platform-workflows/.github/workflows/build_charms_with_cache.yaml@v2
Expand All @@ -83,15 +68,14 @@ jobs:
- "3.1.6" # renovate: latest juju 3
name: ${{ matrix.tox-environments }} | ${{ matrix.agent-versions }}
needs:
- lib-check
- lint
- unit-test
- build
runs-on: ubuntu-latest
timeout-minutes: 120
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Set channel
run: |
juju_channel=$(echo "${{ matrix.agent-versions }}" | cut -c 1-3)
Expand Down
34 changes: 34 additions & 0 deletions .github/workflows/lib-check.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Copyright 2022 Canonical Ltd.
# See LICENSE file for licensing details.
name: Check libs

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

on:
pull_request:
paths-ignore:
- '.gitignore'
- '.jujuignore'
- 'LICENSE'
- '**.md'
- 'renovate.json'

jobs:
lib-check:
name: Check libraries
runs-on: ubuntu-latest
timeout-minutes: 5
if: ${{ github.event.pull_request.head.repo.full_name == 'canonical/pgbouncer-k8s-operator' }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Check libs
uses: canonical/charming-actions/check-libraries@2.4.0
with:
credentials: "${{ secrets.CHARMHUB_TOKEN }}"
github-token: "${{ secrets.GITHUB_TOKEN }}"

3 changes: 2 additions & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ on:
- poetry.lock
- pyproject.toml
- '.github/workflows/ci.yaml'
- '.github/workflows/lib-check.yaml'

jobs:
ci-tests:
Expand All @@ -28,7 +29,7 @@ jobs:
timeout-minutes: 60
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Release charm libraries
Expand Down
Loading