-
Notifications
You must be signed in to change notification settings - Fork 44
82 lines (80 loc) · 2.65 KB
/
nightly.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
name: nightly against `main` branch of `aiida-core`
on:
schedule:
- cron: "0 0 * * *" # Run every day at midnight
workflow_dispatch:
jobs:
tests:
runs-on: ubuntu-latest
timeout-minutes: 45
services:
postgres:
image: postgres:12
env:
POSTGRES_DB: test_lammps
POSTGRES_PASSWORD: ""
POSTGRES_HOST_AUTH_METHOD: trust
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
rabbitmq:
image: rabbitmq:latest
ports:
- 5672:5672
strategy:
matrix:
python: ["3.9", "3.10", "3.11"]
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
- name: Install system dependencies
run: |
curl https://bazel.build/bazel-release.pub.gpg | sudo apt-key add -
sudo apt update
sudo .ci/enable_ssh_localhost.sh
sudo apt install locate
sudo updatedb
- name: Upgrade pip
run: |
pip install --upgrade pip
pip --version
- name: Install Tox
run: pip install tox
- name: Install AiiDA-Wannier90
run: pip install git+https://github.com/aiidateam/aiida-wannier90#egg=aiida-wannier90
- name: Install AiiDA-VASP
id: install_plugin
run: |
pip install -e .[graphs,dev]
pip freeze
- name: Install AiiDA main branch
id: install_aiida
run: |
pip install git+https://github.com/aiidateam/aiida-core@main
- name: Remove dot in Python version for passing version to tox
uses: frabert/replace-string-action@master
id: tox
with:
pattern: '\.'
string: ${{ matrix.python }}
replace-with: ""
- name: Run tox
run: tox -e py${{ steps.tox.outputs.replaced }}-aiida_vasp
- name: Notification to Slack channel
if: steps.install_plugin.outcome == 'Failure' || steps.install_aiida.outcome == 'Failure' || steps.tox.outcome == 'Failure'
uses: rtCamp/action-slack-notify@master
env:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
SLACK_ICON: https://www.materialscloud.org/discover/images/0ba0a17d.aiida-logo-128.png
SLACK_USERNAME: aiida-vasp
SLACK_CHANNEL: nightly
SLACK_COLOR: b60205
SLACK_TITLE: "Nightly build against `aiida-core/main` failed"
SLACK_MESSAGE: "The tests fail with the current version of `aiida-core/main`."