Skip to content

Merge pull request #70 from canonical/dependabot/github_actions/tj-ac… #211

Merge pull request #70 from canonical/dependabot/github_actions/tj-ac…

Merge pull request #70 from canonical/dependabot/github_actions/tj-ac… #211

Workflow file for this run

# This is a basic workflow to help you get started with Actions
name: tests
# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the main branch
push:
branches: [ main ]
pull_request:
branches: [ main ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
linter:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: actions/setup-python@v6
with:
python-version: "3.13"
- name: Install project
run: make install
- name: Run linter
run: make lint
openapi:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: actions/setup-python@v6
with:
python-version: "3.13"
- name: Install project
run: make install
- name: Compare openapi.yaml file
run: |
set -e
cp cos_registration_server/openapi.yaml openapi_before.yaml
make openapi
cp cos_registration_server/openapi.yaml openapi_after.yaml
diff openapi_before.yaml openapi_after.yaml
tests_linux:
needs: [linter, openapi]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: actions/setup-python@v6
with:
python-version: "3.13"
- name: Install project
run: make install
- name: Generate django secret key
run: |
GENERATED_SECRET='$(make secretkey)'
echo "SECRET_KEY_DJANGO=${GENERATED_SECRET}" >> $GITHUB_ENV
- name: Run tests
run: make test
- name: "Upload coverage to Codecov"
uses: codecov/codecov-action@v5