detect test pollution #13
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: 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: | |
random: | |
if: github.repository == 'nilearn/nilearn' | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout nilearn | |
uses: actions/checkout@v4 | |
- name: Setup python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: 3.12 | |
- name: Install tox | |
run: python -m pip install tox | |
- name: Run test suite | |
run: tox run -e test_randomize |