-
Notifications
You must be signed in to change notification settings - Fork 25
94 lines (92 loc) · 3.68 KB
/
daily.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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
name: Daily runs
on:
schedule:
- cron: '0 5 * * *'
push:
paths:
- '.github/workflows/daily.yml'
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'
NOTE: 'Nightly Builds' # run once with nightlies
- PYTHON_VERSION: '3.10'
NOTE: 'Default Builds' # run once with normal dependencies
steps:
- name: Checkout branch
uses: actions/checkout@v3
- uses: mamba-org/setup-micromamba@875557da4ee020f18df03b8910a42203fbf02da1
with:
environment-file: environment.yml
create-args: >- # h2o-py and openjdk from environment-benchmark.yml
python=${{ matrix.PYTHON_VERSION }}
h2o-py
openjdk
- name: Install nightlies
if: matrix.NOTE == 'Nightly Builds'
shell: bash -el {0}
run: |
# needed for tabmat
echo "Install compilation dependencies"
micromamba install -y c-compiler cxx-compiler cython jemalloc-local libgomp mako xsimd
PRE_WHEELS="https://pypi.anaconda.org/scipy-wheels-nightly/simple"
echo "Installing Numpy nightly"
micromamba remove -y numpy
pip install --pre --no-deps --only-binary :all: --upgrade --timeout=60 -i $PRE_WHEELS numpy
echo "Installing Pandas nightly"
micromamba remove -y pandas
pip install --pre --no-deps --only-binary :all: --upgrade --timeout=60 -i $PRE_WHEELS pandas
echo "Install scikit-learn nightly"
micromamba remove -y scikit-learn
pip install --pre --no-deps --only-binary :all: --upgrade --timeout=60 -i $PRE_WHEELS scikit-learn
echo "Installing Scipy nightly"
micromamba remove -y scipy
pip install --pre --no-deps --only-binary :all: --upgrade --timeout=60 -i $PRE_WHEELS scipy
echo "Install tabmat nightly"
micromamba remove -y tabmat
pip install git+https://github.com/Quantco/tabmat
- name: Install repository
shell: bash -el {0}
run: pip install --no-use-pep517 --no-deps --disable-pip-version-check -e .
- name: Run pytest
shell: bash -el {0}
run: pytest -nauto tests --doctest-modules src/glum/
- name: Run doctest
shell: bash -el {0}
# Check that the readme example will work by running via doctest.
# We run outside the repo to make the test a bit more similar to
# a user running after installing with conda.
run: |
mkdir ../temp
cp README.md ../temp
cd ../temp
python -m doctest -v README.md
# - 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"]
# })
# }
# });