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

[DO NOT MERGE] Dropping poetry for uv #112

Draft
wants to merge 7 commits into
base: main
Choose a base branch
from
Draft
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
209 changes: 107 additions & 102 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,10 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v3
- name: Install tox
run: pipx install tox
run: uv tool install tox --with tox-uv -p 3.10
- name: Run linters
run: tox run -e lint

Expand All @@ -33,113 +35,116 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v3
- name: Install tox
run: pipx install tox
run: uv tool install tox --with tox-uv -p 3.10
- name: Run tests
run: tox run -e unit

build:
name: Build charms
uses: canonical/data-platform-workflows/.github/workflows/[email protected]
with:
cache: true
path-to-charm-directory: ${{ matrix.path }}
strategy:
matrix:
path:
- .
- tests/integration/app-charm

integration-test:
strategy:
fail-fast: false
matrix:
tox-environments:
- integration-charm
- integration-password-rotation
- integration-provider
- integration-tls
- integration-backup
- integration-replication
name: ${{ matrix.tox-environments }}
needs:
- lint
- unit-test
- build
runs-on: ubuntu-latest
timeout-minutes: 120
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup operator environment
uses: charmed-kubernetes/actions-operator@main
with:
provider: microk8s
channel: "1.28-strict/stable"
juju-channel: 3.1/stable
bootstrap-options: "--agent-version 3.1.6"
- name: Download packed charm(s)
uses: actions/download-artifact@v4
with:
pattern: packed-charm-cache-true-*
merge-multiple: true
- name: Select tests
id: select-tests
run: |
if [ "${{ github.event_name }}" == "schedule" ]
then
echo Running unstable and stable tests
echo "mark_expression=" >> $GITHUB_OUTPUT
else
echo Skipping unstable tests
echo "mark_expression=not unstable" >> $GITHUB_OUTPUT
fi
- name: Run integration tests
run: tox run -e ${{ matrix.tox-environments }} -- -m '${{ steps.select-tests.outputs.mark_expression }}'
env:
CI_PACKED_CHARMS: ${{ needs.build.outputs.charms }}
# with:
# cache: true
# path-to-charm-directory: ${{ matrix.path }}
# strategy:
# matrix:
# path:
# - .
# - tests/integration/app-charm

integration-test-ha:
strategy:
fail-fast: false
matrix:
tox-environments:
- integration-ha
name: ${{ matrix.tox-environments }}
needs:
- lint
- unit-test
- build
- integration-test
runs-on: ubuntu-latest
timeout-minutes: 120
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup operator environment
uses: charmed-kubernetes/actions-operator@main
with:
provider: microk8s
channel: "1.28-strict/stable"
juju-channel: 3.1/stable
bootstrap-options: "--agent-version 3.1.6"
- name: Download packed charm(s)
uses: actions/download-artifact@v4
with:
pattern: packed-charm-cache-true-*
merge-multiple: true
- name: Select tests
id: select-tests
run: |
if [ "${{ github.event_name }}" == "schedule" ]
then
echo Running unstable and stable tests
echo "mark_expression=" >> $GITHUB_OUTPUT
else
echo Skipping unstable tests
echo "mark_expression=not unstable" >> $GITHUB_OUTPUT
fi
- name: Run integration tests
run: tox run -e ${{ matrix.tox-environments }} -- -m '${{ steps.select-tests.outputs.mark_expression }}' --keep-models
env:
CI_PACKED_CHARMS: ${{ needs.build.outputs.charms }}
# integration-test:
# strategy:
# fail-fast: false
# matrix:
# tox-environments:
# - integration-charm
# - integration-password-rotation
# - integration-provider
# - integration-tls
# - integration-backup
# - integration-replication
# name: ${{ matrix.tox-environments }}
# needs:
# - lint
# - unit-test
# - build
# runs-on: ubuntu-latest
# timeout-minutes: 120
# steps:
# - name: Checkout
# uses: actions/checkout@v4
# - name: Setup operator environment
# uses: charmed-kubernetes/actions-operator@main
# with:
# provider: microk8s
# channel: "1.28-strict/stable"
# juju-channel: 3.1/stable
# bootstrap-options: "--agent-version 3.1.6"
# - name: Download packed charm(s)
# uses: actions/download-artifact@v4
# with:
# pattern: packed-charm-cache-true-*
# merge-multiple: true
# - name: Select tests
# id: select-tests
# run: |
# if [ "${{ github.event_name }}" == "schedule" ]
# then
# echo Running unstable and stable tests
# echo "mark_expression=" >> $GITHUB_OUTPUT
# else
# echo Skipping unstable tests
# echo "mark_expression=not unstable" >> $GITHUB_OUTPUT
# fi
# - name: Run integration tests
# run: tox run -e ${{ matrix.tox-environments }} -- -m '${{ steps.select-tests.outputs.mark_expression }}'
# env:
# CI_PACKED_CHARMS: ${{ needs.build.outputs.charms }}

# integration-test-ha:
# strategy:
# fail-fast: false
# matrix:
# tox-environments:
# - integration-ha
# name: ${{ matrix.tox-environments }}
# needs:
# - lint
# - unit-test
# - build
# - integration-test
# runs-on: ubuntu-latest
# timeout-minutes: 120
# steps:
# - name: Checkout
# uses: actions/checkout@v4
# - name: Setup operator environment
# uses: charmed-kubernetes/actions-operator@main
# with:
# provider: microk8s
# channel: "1.28-strict/stable"
# juju-channel: 3.1/stable
# bootstrap-options: "--agent-version 3.1.6"
# - name: Download packed charm(s)
# uses: actions/download-artifact@v4
# with:
# pattern: packed-charm-cache-true-*
# merge-multiple: true
# - name: Select tests
# id: select-tests
# run: |
# if [ "${{ github.event_name }}" == "schedule" ]
# then
# echo Running unstable and stable tests
# echo "mark_expression=" >> $GITHUB_OUTPUT
# else
# echo Skipping unstable tests
# echo "mark_expression=not unstable" >> $GITHUB_OUTPUT
# fi
# - name: Run integration tests
# run: tox run -e ${{ matrix.tox-environments }} -- -m '${{ steps.select-tests.outputs.mark_expression }}' --keep-models
# env:
# CI_PACKED_CHARMS: ${{ needs.build.outputs.charms }}
1 change: 1 addition & 0 deletions .python-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.10
Loading
Loading