-
Notifications
You must be signed in to change notification settings - Fork 48
146 lines (125 loc) · 4.49 KB
/
full_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
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
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
name: Full Suite End-to-end test
on:
push:
branches:
- master
- next
paths-ignore:
- 'docs/**'
pull_request:
branches:
- master
- next
paths-ignore:
- 'docs/**'
jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10"]
steps:
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Clone the QCArchive repository
uses: actions/checkout@v3
with:
fetch-depth: 0
path: qcarchive
#################################################
# QCFractal Server
#################################################
- name: Configure conda for the QCFractal server
uses: conda-incubator/setup-miniconda@v2
with:
python-version: ${{ matrix.python-version }}
miniforge-variant: Mambaforge
miniforge-version: latest
activate-environment: qcarchive-server
environment-file: qcarchive/qcarchivetesting/conda-envs/fulltest_server.yaml
auto-activate-base: false
- name: Install QCFractal
shell: bash -l {0}
run: |
pip install -e ./qcarchive/qcportal -e ./qcarchive/qcfractalcompute -e ./qcarchive/qcfractal
- name: Conda info for the QCFractal server
shell: bash -l {0}
run: |
conda info
conda list
- name: Start the QCFractal server
shell: bash -l {0}
run: |
mkdir server; cd server
cp ../qcarchive/qcarchivetesting/qcarchivetesting/config_files/gha_fractal_server.yaml ./
qcfractal-server --config=gha_fractal_server.yaml init-db
qcfractal-server --config=gha_fractal_server.yaml start &
#################################################
# QCFractalCompute worker
#################################################
- name: Configure conda for QCFractalCompute worker
uses: conda-incubator/setup-miniconda@v2
with:
python-version: ${{ matrix.python-version }}
miniforge-variant: Mambaforge
miniforge-version: latest
activate-environment: qcarchive-worker
environment-file: qcarchive/qcarchivetesting/conda-envs/fulltest_worker.yaml
auto-activate-base: false
- name: Install QCFractalCompute
shell: bash -l {0}
run: |
pip install -e ./qcarchive/qcportal -e ./qcarchive/qcfractalcompute
- name: Conda info for the QCFractalCompute worker
shell: bash -l {0}
run: |
conda info
conda list
- name: Start the QCFractalCompute worker
shell: bash -l {0}
run: |
mkdir compute; cd compute
cp ../qcarchive/qcarchivetesting/qcarchivetesting/config_files/gha_fractal_compute.yaml ./
qcfractal-compute-manager --config=gha_fractal_compute.yaml &
#################################################
# QCPortal client
#################################################
- name: Configure conda for the QCPortal client
uses: conda-incubator/setup-miniconda@v2
with:
python-version: ${{ matrix.python-version }}
miniforge-variant: Mambaforge
miniforge-version: latest
activate-environment: qcarchive-qcportal
environment-file: qcarchive/qcarchivetesting/conda-envs/fulltest_qcportal.yaml
auto-activate-base: false
- name: Install QCPortal
shell: bash -l {0}
run: |
pip install -e ./qcarchive/qcportal
pip install pytest
- name: Conda info for the QCPortal client
shell: bash -l {0}
run: |
conda info
conda list
#################################################
# Run tests
#################################################
- name: Run Tests
shell: bash -l {0}
run: |
python3 -m venv testing_env
source testing_env/bin/activate
pip install --upgrade pip
cd qcarchive
pip install -e ./qcportal -e ./qcfractalcompute -e ./qcfractal -e ./qcarchivetesting
pytest --log-level=DEBUG --fractal-uri="http://127.0.0.1:7900" qcarchivetesting
- name: Stop server & worker
shell: bash -l {0}
run: |
killall qcfractal-compute-manager
killall qcfractal-server