Update tests #41
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
--- | |
# Run basic tests for this app | |
name: CI | |
on: [push, pull_request] | |
# https://docs.github.com/en/actions/using-jobs/using-concurrency | |
concurrency: | |
# only cancel in-progress jobs or runs for the current workflow - matches against branch & tags | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
env: | |
FORCE_COLOR: 1 | |
jobs: | |
test-package: | |
strategy: | |
matrix: | |
python-version: ['3.9', '3.11'] | |
aiida-core-version: ['2.3', '2.6'] | |
fail-fast: false | |
runs-on: ubuntu-latest | |
timeout-minutes: 30 | |
services: | |
rabbitmq: | |
image: rabbitmq:latest | |
ports: | |
- 5672:5672 | |
steps: | |
- name: Check out app | |
uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install uv | |
uses: astral-sh/setup-uv@v1 | |
with: | |
version: 0.4.7 | |
- name: Install package | |
run: uv pip install --system -e .[dev] aiida-core==${{ matrix.aiida-core-version }} | |
- name: Run pytest | |
# Only collect code coverage with aiida-core=2.3, to speed up tests | |
# with higher aiida versions that for some reason run slower, see: | |
# https://github.com/aiidalab/aiidalab-qe/issues/766 | |
run: pytest -v tests ${{ matrix.aiida-core-version == '2.3' && '--cov=aiidalab_qe' || '' }} --skip-slow | |
- name: Upload coverage reports to Codecov | |
uses: codecov/codecov-action@v4 | |
with: | |
flags: python-${{ matrix.python-version }} | |
token: ${{ secrets.CODECOV_TOKEN }} |