-
Notifications
You must be signed in to change notification settings - Fork 8
43 lines (38 loc) · 1.78 KB
/
concurrency.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
# 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