-
Notifications
You must be signed in to change notification settings - Fork 7
75 lines (60 loc) · 1.75 KB
/
ci_tests.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
65
66
67
68
69
70
71
72
73
74
75
name: CI - Tests
on:
pull_request:
push:
branches:
- develop
- stable
- 'push-action/**'
jobs:
basic_tests:
name: External
uses: SINTEF/ci-cd/.github/workflows/[email protected]
with:
# General
install_extras: "[dev]"
# pre-commit
run_pre-commit: true
python_version_pre-commit: "3.9"
skip_pre-commit_hooks: pylint
# pylint & safety
run_pylint: false
run_safety: false
# Build package
run_build_package: true
python_version_package: "3.9"
build_libs: build
build_cmd: "python -m build"
# Build documentation
run_build_docs: false
pytest:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.9", "3.10", "3.11"]
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version}}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version}}
- name: Install initial dependencies
run: |
python -m pip install -U pip
pip install -U setuptools wheel
pip install -e .[testing]
- name: PyTest
run: pytest -vvv --cov=optimade_client --cov-report=xml --cov-append tests/
- name: Install server dependencies
run: pip install -e .[server]
- name: PyTest (with 'server' extra)
run: pytest --cov=optimade_client --cov-report=xml --cov-append tests/cli/
- name: Upload coverage to Codecov
if: matrix.python-version == '3.9' && github.repository == 'CasperWA/voila-optimade-client'
uses: codecov/codecov-action@v3
with:
name: optimade-client
file: ./coverage.xml
flags: optimade-client