nightly #974
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: nightly | |
on: | |
schedule: | |
- cron: '0 0 * * *' # Run every day at midnight | |
push: | |
paths: | |
- '.github/workflows/nightly.yml' | |
pull_request: | |
paths: | |
- '.github/workflows/nightly.yml' | |
jobs: | |
tests: | |
if: github.repository == 'aiidateam/aiida-quantumespresso' # Prevent running the builds on forks as well | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ['3.9', '3.10', '3.11'] | |
services: | |
postgres: | |
image: postgres:12 | |
rabbitmq: | |
image: rabbitmq:latest | |
ports: | |
- 5672:5672 | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Cache Python dependencies | |
uses: actions/cache@v1 | |
with: | |
path: ~/.cache/pip | |
key: pip-${{ matrix.python-version }}-tests-${{ hashFiles('**/setup.json') }} | |
restore-keys: | |
pip-${{ matrix.python-version }}-tests | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install Python dependencies | |
id: install | |
run: | | |
pip install -e .[tests] | |
pip install git+https://github.com/aiidateam/aiida-core@main#egg=aiida-core[atomic_tools] | |
- name: Run pytest | |
id: tests | |
env: | |
AIIDA_WARN_v3: 1 | |
run: pytest -sv tests | |
- name: Slack notification | |
if: always() && (steps.install.outcome == 'Failure' || steps.tests.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-quantumespresso | |
SLACK_CHANNEL: dev-aiida-qe | |
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`." |