-
Notifications
You must be signed in to change notification settings - Fork 26
63 lines (54 loc) · 2.38 KB
/
Copy pathpacemaker-test.yml
File metadata and controls
63 lines (54 loc) · 2.38 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
53
54
55
56
57
58
59
60
61
62
63
# This workflow will install pacemaker and its dependencies, run tests and lint with Python 3.10
name: Testing Pacemaker (Python 3.10)
on:
workflow_dispatch:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
pacemaker-test:
runs-on: ubuntu-latest
env:
PYTHON_VERSION: "3.10"
steps:
- name: Fetch Most Recent Docker Image Tag
run: |
TAG=$(curl -H "Accept: application/vnd.github.v3+json" \
-H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
https://api.github.com/orgs/autoatml/packages/container/autoplex%2Fautoplex-python-3.10/versions \
| jq -r 'sort_by(.created_at) | reverse | .[0].metadata.container.tags[0]')
echo "VERSION=$TAG" >> $GITHUB_ENV
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Run Pacemaker Tests
run: |
docker pull ghcr.io/autoatml/autoplex/autoplex-python-3.10:${{ env.VERSION }}
docker run --rm \
-v ${{ github.workspace }}:/workspace \
-w /workspace \
ghcr.io/autoatml/autoplex/autoplex-python-3.10:${{ env.VERSION }} \
bash -c "
git config --global --add safe.directory /workspace && \
python -m pip install --upgrade pip && \
python -m uv cache clean && \
python -m uv pip install setuptools==81.0.0 && \
python -m uv pip install 'protobuf<3.20' tensorflow==2.8.0 && \
python -m uv pip install --no-deps git+https://github.com/ICAMS/TensorPotential.git@1e44b2558356800ae070658c0bb856ff9bf74538 && \
python -m uv pip install --no-deps git+https://github.com/ICAMS/python-ace.git@d1c213a7d9c5b809a3ae83b2e5a916be26d921f0 && \
python -m uv pip install '.[strict-base,tests,aims]' && \
OMP_NUM_THREADS=1 pytest --cache-clear --cov=autoplex --cov-report term-missing --cov-append -vv --durations-path /workspace/tests/test_data/.pytest-split-durations --store-durations -k 'PACE'
"
- name: Upload pacemaker test durations artifact
uses: actions/upload-artifact@v4
with:
name: test-durations-pacemaker
include-hidden-files: true
path: ./tests/test_data/.pytest-split-durations
- name: Upload coverage
uses: actions/upload-artifact@v4
with:
name: coverage-pacemaker
include-hidden-files: true
path: ./.coverage