-
Notifications
You must be signed in to change notification settings - Fork 24
118 lines (104 loc) · 3.58 KB
/
ci.yml
File metadata and controls
118 lines (104 loc) · 3.58 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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
name: CI
on:
workflow_dispatch:
pull_request:
branches: [main]
types: [opened, synchronize, reopened]
schedule:
- cron: '0 0 * * *'
jobs:
build-and-test:
name: CI and Functional Tests
runs-on: ubuntu-latest
defaults:
run:
shell: bash -el {0}
steps:
- name: Checkout ARC
uses: actions/checkout@v4
with:
path: ARC
- name: Clean Ubuntu Image
uses: jlumbroso/free-disk-space@main
with:
tool-cache: true
android: true
dotnet: true
haskell: true
large-packages: true
swap-storage: true
- name: Set up micromamba (arc_env)
uses: mamba-org/setup-micromamba@v2
with:
environment-name: arc_env
environment-file: ARC/environment.yml
cache-environment: true
cache-downloads: true
generate-run-shell: true
- name: Install conda in micromamba base
shell: micromamba-shell {0}
run: |
echo "::group::Install conda in micromamba base"
micromamba install -n base -c conda-forge conda
echo "::endgroup::"
- name: Export ARC paths
shell: micromamba-shell {0}
working-directory: ARC
run: |
echo "PATH=$PATH:$PWD" >> "$GITHUB_ENV"
echo "PYTHONPATH=$PYTHONPATH:$PWD" >> "$GITHUB_ENV"
- name: Install Julia 1.10
shell: micromamba-shell {0}
run: |
echo "::group::Install juliaup + Julia 1.10"
# 1) Bootstrap juliaup non-interactively (-y)
curl -fsSL https://install.julialang.org | sh -s -- -y
# 2) Make juliaup visible *now* (CI shells won’t re-source rc files)
export PATH="$HOME/.juliaup/bin:$PATH"
# 3) Install & select Julia 1.10
juliaup add 1.10
juliaup default 1.10
# 4) Persist for subsequent steps
echo "PATH=$HOME/.juliaup/bin:$PATH" >> "$GITHUB_ENV"
echo "::endgroup::"
julia --version # Check that Julia is installed correctly
- name: Install all extras - CI
shell: micromamba-shell {0}
working-directory: ARC
env:
MAMBA_ALWAYS_YES: "true"
CONDA_ALWAYS_YES: "true"
run: make install-ci
- name: Set TS-GCN and AutoTST in PYTHONPATH
shell: micromamba-shell {0}
working-directory: ARC
run: |
echo "PYTHONPATH=$(realpath ../TS-GCN):$(realpath ../AutoTST):$PYTHONPATH" >> $GITHUB_ENV
- name: Compile ARC molecule
shell: micromamba-shell {0}
working-directory: ARC
run: |
make compile
- name: Run Unit Tests
shell: micromamba-shell {0}
working-directory: ARC
run: |
echo "Running Unit Tests..."
export PYTHONPATH="${{ github.workspace }}/AutoTST:${{ github.workspace }}/KinBot:$PYTHONPATH"
pytest arc/ --cov --cov-report=xml -ra -vv -n auto
- name: Run Functional Tests
shell: micromamba-shell {0}
working-directory: ${{ github.workspace }}/ARC
run: |
echo "Running Functional Tests from $(pwd)..."
export PYTHONPATH="${{ github.workspace }}/AutoTST:${{ github.workspace }}/KinBot:$PYTHONPATH"
pytest functional/ -ra -vv -n auto
- name: Upload coverage data
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ARC/coverage.xml
flags: unittests,functionaltests
name: codecov-umbrella
verbose: true
fail_ci_if_error: false