-
Notifications
You must be signed in to change notification settings - Fork 4
52 lines (44 loc) · 1.28 KB
/
test.yml
File metadata and controls
52 lines (44 loc) · 1.28 KB
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
name: tests
on: [push, pull_request]
jobs:
tests:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.8', '3.9', '3.10']
services:
postgres:
image: postgres:12
rabbitmq:
image: rabbitmq:latest
ports:
- 5672:5672
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
architecture: x64
- name: Get pip cache dir
id: pip-cache
run: |
echo "::set-output name=dir::$(pip cache dir)"
- name: Cache python dependencies
id: cache-pip
uses: actions/cache@v2
with:
path: ${{ steps.pip-cache.outputs.dir }}
key: ${{ runner.os }}-pip-${{ matrix.python-version }}-${{ hashFiles('**/setup.json') }}
restore-keys: |
${{ runner.os }}-pip-${{ matrix.python-version }}-
- name: Install python dependencies
run: |
pip install .[testing]
- name: Run test suite
env:
PYTEST_ADDOPTS: "--durations=0"
run: pytest --cov-report xml --cov-report term-missing --cov-append --cov aiida_gaussian_datatypes tests/
- uses: codecov/codecov-action@v3.1.0
with:
file: ./coverage.xml
fail_ci_if_error: true