Skip to content

Commit 8dbde79

Browse files
authored
DevOps: add a weekly build and test (#81)
Added a weekly build of the plugin and its related tests against latest git version of the main dependencies: phonopy, aiida-core and aiida-quantumespresso. Spglib might be introduced later to fine grain the tests, as it is used for symmetry analysis.
1 parent 1a3c4c8 commit 8dbde79

File tree

1 file changed

+73
-0
lines changed

1 file changed

+73
-0
lines changed

.github/workflows/weekly.yml

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
name: weekly
2+
3+
on:
4+
schedule:
5+
- cron: '0 0 * * 0' # Run every week on Sunday
6+
push:
7+
paths:
8+
- '.github/workflows/weekly.yml'
9+
pull_request:
10+
paths:
11+
- '.github/workflows/weekly.yml'
12+
13+
14+
jobs:
15+
16+
tests:
17+
18+
if: github.repository == 'bastonero/aiida-vibroscopy' # Prevent running the builds on forks as well
19+
runs-on: ubuntu-latest
20+
21+
strategy:
22+
matrix:
23+
python-version: ['3.9', '3.12']
24+
25+
services:
26+
postgres:
27+
image: postgres:12
28+
rabbitmq:
29+
image: rabbitmq:latest
30+
ports:
31+
- 5672:5672
32+
33+
steps:
34+
- uses: actions/checkout@v2
35+
36+
- name: Cache Python dependencies
37+
uses: actions/cache@v4
38+
with:
39+
path: ~/.cache/pip
40+
key: pip-${{ matrix.python-version }}-tests-${{ hashFiles('**/setup.json') }}
41+
restore-keys:
42+
pip-${{ matrix.python-version }}-tests
43+
44+
- name: Set up Python ${{ matrix.python-version }}
45+
uses: actions/setup-python@v2
46+
with:
47+
python-version: ${{ matrix.python-version }}
48+
49+
- name: Install Python dependencies
50+
id: install
51+
run: |
52+
pip install -e .[tests]
53+
pip install git+https://github.com/aiidateam/aiida-core@main#egg=aiida-core
54+
pip install git+https://github.com/phonopy/phonopy.git@develop
55+
pip install git+https://github.com/aiidateam/aiida-quantumespresso.git@main
56+
57+
- name: Run pytest
58+
id: tests
59+
env:
60+
AIIDA_WARN_v3: 1
61+
run: pytest -sv tests
62+
63+
# - name: Slack notification
64+
# if: always() && (steps.install.outcome == 'Failure' || steps.tests.outcome == 'Failure')
65+
# uses: rtCamp/action-slack-notify@master
66+
# env:
67+
# SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
68+
# SLACK_ICON: https://www.materialscloud.org/discover/images/0ba0a17d.aiida-logo-128.png
69+
# SLACK_USERNAME: aiida-quantumespresso
70+
# SLACK_CHANNEL: dev-aiida-qe
71+
# SLACK_COLOR: b60205
72+
# SLACK_TITLE: "Nightly build against `aiida-core/main` failed"
73+
# SLACK_MESSAGE: "The tests fail with the current version of `aiida-core/main`."

0 commit comments

Comments
 (0)