forked from nilearn/nilearn
-
Notifications
You must be signed in to change notification settings - Fork 0
57 lines (43 loc) · 1.72 KB
/
detect_test_pollution.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
name: 'detect test pollution'
# Runs once a month.
# Use pytest with the pytest-random-order plugin to run all tests
# in a random order.
# This aims to detect tests that are not properly isolated
# from each other (test pollution).
on:
# Uses the cron schedule for github actions
#
# https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows#scheduled-events
#
# ┌───────────── minute (0 - 59)
# │ ┌───────────── hour (0 - 23)
# │ │ ┌───────────── day of the month (1 - 31)
# │ │ │ ┌───────────── month (1 - 12 or JAN-DEC)
# │ │ │ │ ┌───────────── day of the week (0 - 6 or SUN-SAT)
# │ │ │ │ │
# │ │ │ │ │
# │ │ │ │ │
# * * * * *
schedule:
- cron: "0 0 25 * *" # on the 25th of every monday
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
latest:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup python
uses: actions/setup-python@v4
with:
python-version: 3.11
- name: Display Python version
run: python -c "import sys; print(sys.version)"
- name: Install dependencies
run: ./build_tools/github/dependencies.sh
- name: Install nilearn
run: ./build_tools/github/install.sh
- name: Install extra dependencies
run: pip install pytest-random-order
- name: Run tests
run: python -m pytest --pyargs nilearn --cov=nilearn --random-order