Skip to content

Merge pull request #258 from NHSDigital/next #396

Merge pull request #258 from NHSDigital/next

Merge pull request #258 from NHSDigital/next #396

Workflow file for this run

name: CI
on:
push:
workflow_call:
env:
MISE_ENV: development
jobs:
gitleaks:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0 # Full history is needed to scan all commits
- uses: jdx/mise-action@v3
with:
cache: true
- run: mise gitleaks
pytest:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: jdx/mise-action@v3
with:
cache: true
- env:
SECRET_KEY: "${{ secrets.SECRET_KEY_FOR_TESTS }}"
run: mise test
ruff:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: jdx/mise-action@v3
with:
cache: true
- run: mise lint
coverage:
needs: [pytest]
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
outputs:
badge_url: ${{ steps.upload-coverage-badge-artifact-step.outputs.artifact-url }}
html_report_url: ${{ steps.upload-html-report-artifact-step.outputs.artifact-url }}
steps:
- uses: actions/checkout@v6
- uses: jdx/mise-action@v3
with:
cache: true
- env:
SECRET_KEY: "${{ secrets.SECRET_KEY_FOR_TESTS }}"
COVERAGE_THRESHOLD: 80
run: mise test:coverage
- uses: actions/upload-artifact@v5
id: upload-html-report-artifact-step
if: always()
with:
name: coverage-html
path: htmlcov
retention-days: 10
compression-level: 0
- uses: actions/upload-artifact@v5
id: upload-coverage-badge-artifact-step
if: always()
with:
name: coverage-badge
path: coverage.svg
retention-days: 10
compression-level: 0