Skip to content

mydiracx extension extensions/src/mydiracx #7

mydiracx extension extensions/src/mydiracx

mydiracx extension extensions/src/mydiracx #7

Workflow file for this run

name: Extensions Basic Tests
on:
push:
branches:
- main
- mydiracx-extension
pull_request:
branches:
- main
defaults:
run:
shell: bash -el {0}
jobs:
pytest:
name: Unit test - ${{ matrix.package }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- package: "./diracx-db"
dependencies: "./diracx-testing ./diracx-core"
- package: "./diracx-routers"
dependencies: "./diracx-testing ./diracx-core ./diracx-db"
- package: "./diracx-client"
dependencies: "./diracx-testing ./diracx-core"
- package: "./diracx-api"
dependencies: "./diracx-testing ./diracx-core ./diracx-client"
- package: "./diracx-cli"
dependencies: "./diracx-testing ./diracx-core ./diracx-client ./diracx-api"
- package: "./extensions/mydiracx/mydiracx-db"
dependencies: "./diracx-testing ./diracx-core ./diracx-db"
- package: "./extensions/mydiracx/mydiracx-routers"
dependencies: "./diracx-testing ./diracx-core ./diracx-db ./diracx-routers ./extensions/mydiracx/mydiracx-db"
steps:
- name: Checkout code
uses: actions/checkout@v4
- uses: mamba-org/setup-micromamba@v1
with:
# TODO: Use a conda environment file used for the diracx/base container image
environment-name: test-env
create-args: >-
python=3.11
m2crypto
python-gfal2
mypy
pip
init-shell: bash
post-cleanup: 'all'
- name: Set up environment
run: |
pip install pytest-github-actions-annotate-failures
pip install git+https://github.com/DIRACGrid/DIRAC.git@integration
pip install ${{ matrix.dependencies }} ${{ matrix.package }}[types]
- name: Run mypy
run: |
mypy ${{ matrix.package }}/src
- name: Run pytest
run: |
cd ${{ matrix.package }}
pip install .[testing]
pytest --cov-report=xml:coverage.xml --junitxml=report.xml
- name: Upload coverage report
uses: codecov/[email protected]