forked from abacusmodeling/ABACUS-orbitals
-
Notifications
You must be signed in to change notification settings - Fork 1
45 lines (38 loc) · 1.1 KB
/
unittest.yaml
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
name: unittest-on-commit
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
run-unit-tests:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4 # Specify version for best practices
- name: Set up Conda
uses: conda-incubator/setup-miniconda@v3 # Specify version here as well
with:
auto-update-conda: true
python-version: '3.10'
activate-environment: orbgen
use-only-tar-bz2: true
- name: Install prerequisite by conda
run: |
conda install pytorch torchvision torchaudio cpuonly -c pytorch
- name: Install the package
run: |
pip install .
- name: Set up permissions for execute
run: chmod +x ./.github/tests/xtest.sh
- name: Run xtest.sh shell script
run: |
output=$(./.github/tests/xtest.sh)
exit_code=$?
echo "$output"
if [ $exit_code -ne 0 ]; then
echo "Tests failed with exit code $exit_code"
exit $exit_code
fi