-
Notifications
You must be signed in to change notification settings - Fork 14
64 lines (48 loc) · 1.82 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
---
# 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' || '' }}
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4
with:
flags: python-${{ matrix.python-version }}
token: ${{ secrets.CODECOV_TOKEN }}