Daily runs #638
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: Daily runs | |
on: | |
schedule: | |
- cron: '0 5 * * *' | |
push: | |
paths: | |
- '.github/workflows/daily.yml' | |
- '.github/workflows/test.sh' | |
jobs: | |
linux-daily-unittests: | |
name: "Linux - daily unit tests - Python ${{ matrix.PYTHON_VERSION}} - ${{ matrix.NOTE }}" | |
runs-on: ubuntu-latest | |
env: | |
CI: True | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- PYTHON_VERSION: '3.10' | |
PANDAS_VERSION: 'nightly' | |
NUMPY_VERSION: 'nightly' | |
SCIKIT_VERSION: 'nightly' | |
SCIPY_VERSION: 'nightly' | |
TABMAT_VERSION: 'nightly' | |
NOTE: 'Nightly Builds' # run once with nightlies | |
- PYTHON_VERSION: '3.10' | |
PANDAS_VERSION: '' | |
NUMPY_VERSION: '' | |
SCIKIT_VERSION: '' | |
SCIPY_VERSION: '' | |
TABMAT_VERSION: '' | |
NOTE: 'Default Builds' # run once with normal dependencies | |
steps: | |
- name: Pull image | |
run: docker pull condaforge/mambaforge:latest | |
- name: Checkout branch | |
uses: actions/checkout@v3 | |
with: | |
ref: ${{ github.head_ref }} | |
- name: Run CI inside of container | |
uses: ./.github/actions/unittests | |
with: | |
python_version: ${{ matrix.PYTHON_VERSION }} | |
pandas_version: ${{ matrix.PANDAS_VERSION }} | |
numpy_version: ${{ matrix.NUMPY_VERSION }} | |
scikit_version: ${{ matrix.SCIKIT_VERSION }} | |
scipy_version: ${{ matrix.SCIPY_VERSION }} | |
tabmat_version: ${{ matrix.TABMAT_VERSION }} | |
- name: Issue on failure | |
uses: actions/github-script@v6 | |
if: ${{ failure() }} | |
with: | |
script: | | |
github.rest.issues.listForRepo({ | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
state: "open", | |
labels: "[bot] Daily run" | |
}).then((issues) => { | |
if (issues.data.length === 0){ | |
github.rest.issues.create({ | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
title: "Daily run failure: Unit tests", | |
body: "The daily unit tests failed. See https://github.com/Quantco/glum/actions/runs/${{ github.run_id }} for details.", | |
assignees: ["MarcAntoineSchmidtQC"], | |
labels: ["[bot] Daily run"] | |
}) | |
} | |
}); |