Concurrency nightly tests #930
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
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions | |
name: Concurrency nightly tests | |
on: | |
schedule: | |
# See https://help.github.com/en/actions/automating-your-workflow-with-github-actions/events-that-trigger-workflows#scheduled-events-schedule | |
# NOTE: Scheduled workflows run on the latest commit on the default or base branch. | |
# run every day at 05:00 UTC | |
- cron: "0 5 * * *" | |
jobs: | |
tests: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
# Check all OSs (this is important!) | |
os: [ubuntu-latest, macos-latest, windows-latest] | |
# Testing extensively but only on two python versions, typically first and last supported | |
python-version: ["3.8", "3.11"] | |
# Do not run on forks | |
if: github.repository_owner == 'aiidateam' | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v1 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies (including dev dependencies at frozen version) | |
# I'm using pip install -e to make sure that the coverage properly traces the runs | |
# also of the concurrent tests (maybe we can achieve this differently) | |
run: | | |
python -m pip install --upgrade pip | |
pip install -e .[optionaltests] | |
pip install -r requirements.lock | |
- name: Test with pytest | |
# Run only the concurrency tests, and repeating them 5 times to increase the chance that, if there is an issue | |
# only happening rarely, we notice it | |
run: pytest -vv tests/test_concurrency.py --concurrency-repetitions=5 |