Update dependency fastapi to ^0.115.0 #68
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Charm integration tests | |
on: | |
workflow_call: | |
secrets: | |
CHARMHUB_TOKEN: | |
required: true | |
push: | |
branches: | |
- main | |
tags: | |
- v* | |
pull_request: | |
concurrency: | |
group: ${{ github.ref }}-${{ github.workflow }}-${{ github.job }} | |
cancel-in-progress: true | |
jobs: | |
lib-check: | |
name: Check libraries | |
runs-on: ubuntu-24.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 | |
with: | |
fetch-depth: 0 | |
- name: Check libs | |
uses: canonical/charming-actions/check-libraries@934193396735701141a1decc3613818e412da606 # 2.6.3 | |
with: | |
credentials: "${{ secrets.CHARMHUB_TOKEN }}" | |
github-token: "${{ secrets.GITHUB_TOKEN }}" | |
pack-charm: | |
name: Build charm | |
runs-on: ubuntu-24.04 | |
strategy: | |
matrix: | |
charm: [backend, frontend] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 | |
- name: Setup LXD | |
uses: canonical/setup-lxd@v0.1.2 | |
with: | |
channel: 5.21/stable | |
- name: Install charmcraft | |
run: sudo snap install charmcraft --channel=3.x/stable --classic | |
- name: Cache wheels | |
id: cache-wheels | |
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4 | |
with: | |
path: /home/runner/snap/charmcraft/common/cache/charmcraft | |
key: ${{ runner.os }}-wheel-cache-${{ hashFiles('./uv.lock') }} | |
restore-keys: | | |
${{ runner.os }}-wheel-cache- | |
- name: Pack charm | |
run: charmcraft pack -v | |
working-directory: "${{ matrix.charm }}/charm" | |
- name: Upload charm artifact | |
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4 | |
with: | |
name: ${{ matrix.charm }}-charm | |
path: "${{ matrix.charm }}/charm/*.charm" | |
define-matrix: | |
name: Define spread matrix | |
runs-on: ubuntu-24.04 | |
outputs: | |
suites: ${{ steps.suites.outputs.suites }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 | |
- name: Install spread | |
run: sudo snap install spread | |
- name: Generate matrix list | |
id: suites | |
run: | | |
list="$(spread --list github-ci | sed "s|github-ci:ubuntu-24.04:spread/||g" | jq -r -ncR '[inputs | select(length>0)]')" | |
echo "suites=$list" | |
echo "suites=$list" >> $GITHUB_OUTPUT | |
integration-test: | |
name: Spread (${{ matrix.suite }}) | |
runs-on: [self-hosted, linux, large, noble, x64] | |
needs: | |
- define-matrix | |
- lib-check | |
- pack-charm | |
strategy: | |
fail-fast: true | |
matrix: | |
suite: ${{ fromJSON(needs.define-matrix.outputs.suites) }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 | |
- name: Download backend charm artifact | |
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4 | |
with: | |
name: backend-charm | |
path: ${{ github.workspace }}/backend/charm | |
- name: Download frontend charm artifact | |
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4 | |
with: | |
name: frontend-charm | |
path: ${{ github.workspace }}/frontend/charm | |
- name: Setup LXD | |
uses: canonical/setup-lxd@v0.1.2 | |
with: | |
channel: 5.21/stable | |
- name: Setup Go | |
uses: actions/setup-go@v5.3.0 | |
with: | |
go-version: 1.24.0 | |
- name: Install spread | |
run: | | |
go install github.com/snapcore/spread/cmd/spread@latest | |
- name: Run integration tests | |
run: | | |
spread -v "github-ci:ubuntu-24.04:spread/${{ matrix.suite }}" | |
- name: Sanitize suite name | |
if: failure() | |
id: sanitize | |
run: | | |
SANITIZED_SUITE=$(echo "${{ matrix.suite }}" | tr ':/' '-') | |
echo "sanitized_suite=$SANITIZED_SUITE" >> $GITHUB_OUTPUT | |
- name: Upload charmcraft logs | |
if: failure() | |
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4 | |
with: | |
name: charmcraft-logs-${{ steps.sanitize.outputs.sanitized_suite }} | |
path: /home/ubuntu/.local/state/charmcraft/log/* | |
- name: Upload spread artifacts | |
if: failure() | |
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4 | |
with: | |
name: spread-artifacts-${{ steps.sanitize.outputs.sanitized_suite }} | |
path: ./artifacts |