-
Notifications
You must be signed in to change notification settings - Fork 1
57 lines (55 loc) · 2.28 KB
/
actions.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
name: CI
on:
workflow_dispatch:
pull_request:
push:
branches:
- master
jobs:
tests:
runs-on: self-hosted
defaults:
run:
shell: bash -l {0}
steps:
- uses: actions/checkout@v3
- name: Set up Miniconda
uses: conda-incubator/setup-miniconda@v2
with:
channels: conda-forge,defaults,mantid
auto-update-conda: true
miniforge-version: latest
python-version: "3.8"
environment-file: environment.yml
activate-environment: liquid-ref
- name: Restore cached conda environment
id: cache-load
uses: actions/cache/restore@v3
with:
path: /usr/share/miniconda/envs/liquid-ref
key: ${{ runner.os }}-conda-${{ hashFiles('environment.yml') }}
- name: Load Environment
if: steps.cache-load.outputs.cache-hit != 'true'
run: |
mamba env update --file environment.yml --prune
- name: Start xvfb daemon
run: |
/sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -ac -screen 0 1280x1024x16
- name: Test with pytest
run: |
# sed -i '/^sdatasearch.directories=/s/.*/datasearch.directories=\/home\/cloud\/_work\/LiquidsReflectometer\/LiquidsReflectometer\/tests\/data\/liquidsreflectometer-data\/nexus/' ~/.mantid/Mantid.user.properties
echo datasearch.directories=/home/cloud/_work/LiquidsReflectometer/LiquidsReflectometer/tests/data/liquidsreflectometer-data/nexus/ >> ~/.mantid/Mantid.user.properties
cat ~/.mantid/Mantid.user.properties
# sudo apt-get update
# sudo apt-get install git-lfs
dpkg -l git-lfs
git submodule add --force https://code.ornl.gov/sns-hfir-scse/infrastructure/test-data/liquidsreflectometer-data.git tests/data/liquidsreflectometer-data
# git -C tests/data/liquidsreflectometer-data/ lfs install
# git -C tests/data/liquidsreflectometer-data/ pull
git submodule update --init
ls -al tests/data/liquidsreflectometer-data/nexus/
xvfb-run --server-args="-screen 0 1280x1024x16" --auto-servernum python -m pytest
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}