-
Notifications
You must be signed in to change notification settings - Fork 19
60 lines (49 loc) · 2.03 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
---
name: continuous-integration
on: [push, pull_request]
jobs:
test-package:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install package and its dependencies
run: |
pip install -e .[dev,opencl]
pip install pocl-binary-distribution
- name: Run pytest
run: PPAFM_RECOMPILE=1 pytest tests examples -v --cov --cov-report json
- name: Upload coverage report
uses: codecov/codecov-action@v3
with:
flags: python-${{ matrix.python-version }}
- name: Save test images
uses: actions/upload-artifact@v3
with:
name: test-images
path: ./*.png
test-docker:
name: Test docker image on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest] # Further: test docker builds on different OS
steps:
- name: Check out repository
uses: actions/checkout@v2
- name: Build a Docker image
run: docker build -t ppafm:latest .
- name: Execute the container.
run: |
cd examples/PTCDA_single/
docker run --rm -v ${PWD}:/exec ppafm:latest ppafm-generate-ljff -i PTCDA.xyz
docker run --rm -v ${PWD}:/exec ppafm:latest ppafm-generate-elff-point-charges -i PTCDA.xyz --tip s
docker run --rm -v ${PWD}:/exec ppafm:latest ppafm-relaxed-scan -k 0.5 -q -0.10
docker run --rm -v ${PWD}:/exec ppafm:latest ppafm-plot-results -k 0.5 -q -0.10 --arange 0.5 2.0 2 --df