-
Notifications
You must be signed in to change notification settings - Fork 68
100 lines (87 loc) · 2.58 KB
/
ci.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
name: CI
on: [push, pull_request]
jobs:
pre-commit:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.8
uses: actions/setup-python@v3
with:
python-version: 3.8
- name: Install prerequisites
run: pip install --upgrade pip
- name: Install
run: pip install -e .[pre-commit]
- name: Run pre-commit
run:
pre-commit run --all-files || ( git status --short ; git diff ; exit 1 )
test-webpage-build:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.8
uses: actions/setup-python@v3
with:
python-version: 3.8
- name: Install prerequisites
run: pip install --upgrade pip
- name: Install
run: pip install -e . -v
- name: fetch metadata
id: fetch_metadata
run: aiida-registry fetch
- name: make pages
run: aiida-registry html
install-plugins:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.8]
fail-fast: false
timeout-minutes: 55
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
# Idea: create individual conda env for every tested package
# - uses: goanpeca/setup-miniconda@v1
# with:
# # auto-update-conda: true
# python-version: ${{ matrix.python-version }}
- name: Install prerequisites
run: pip install --upgrade pip
- name: Install
run: pip install -e . -v
- name: fetch metadata
run: aiida-registry fetch
# See https://github.com/geerlingguy/raspberry-pi-dramble/issues/166
- name: Force GitHub Actions' docker daemon to use vfs.
run: |
sudo systemctl stop docker
echo '{"cgroup-parent":"/actions_job","storage-driver":"vfs"}' | sudo tee /etc/docker/daemon.json
sudo systemctl start docker
- name: Try installing packages
run: aiida-registry test-install
unit-tests:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.8]
timeout-minutes: 5
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install prerequisites
run: pip install --upgrade pip
- name: Install
run: pip install -e .[testing] -v
- name: Run tests
run: pytest tests/