Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(feat): add nightly cron job #1

Merged
merged 60 commits into from
Nov 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
4e2fe08
(feat): add nightly cron job
ilan-gold Oct 4, 2024
cd1f4ac
(fix): remove `nightly` + only one for now
ilan-gold Oct 4, 2024
841bc4e
(fix): cancel if push
ilan-gold Oct 4, 2024
e0b06cf
(fix): use `with`
ilan-gold Oct 4, 2024
4edd598
(fix): matrix
ilan-gold Oct 4, 2024
312e380
(fix): `run-on` correct
ilan-gold Oct 4, 2024
661bed7
(fix): remove `os`
ilan-gold Oct 4, 2024
80676e8
(fix): try adding `test`
ilan-gold Oct 4, 2024
2cee03b
(feat): add other packages
ilan-gold Oct 4, 2024
165682c
(fix): llvmlite dep
ilan-gold Oct 4, 2024
3fb1287
(chore): override last install
ilan-gold Oct 4, 2024
64471cc
(chore): remove `lllvmlite` business
ilan-gold Oct 4, 2024
80e7200
(chore): add compile arg
ilan-gold Oct 4, 2024
6129b3c
(chore): add squidpy
ilan-gold Oct 9, 2024
685c031
(fix): try adding back in `llvmlite` requirement
ilan-gold Oct 9, 2024
3580f7a
(chore): add verbose installation output
ilan-gold Oct 14, 2024
c850c9e
(fix): try bumpinh llvmlite
ilan-gold Oct 14, 2024
b4d1333
(fix): try matching dep exactly
ilan-gold Oct 14, 2024
856cc16
(Fix): re-add verbose
ilan-gold Oct 14, 2024
46d22b0
(fix): try just numba
ilan-gold Oct 14, 2024
1896a3f
(refactor): use constraints
ilan-gold Oct 14, 2024
6ea7f23
(fix): pin numpy, add scvi-tools
ilan-gold Oct 14, 2024
9a10470
(fix): light formatting
ilan-gold Oct 14, 2024
16067c4
(fix): for now, try to decrease parallel
ilan-gold Oct 15, 2024
a534edf
(fix): turn off parallelization for torch since scanpy doesn't like i…
ilan-gold Oct 15, 2024
7c6f933
(chore): add issue posting
ilan-gold Oct 17, 2024
95fc12d
(chore): remove failure label
ilan-gold Oct 17, 2024
98f7abc
(fix): try cehcking env
ilan-gold Oct 17, 2024
c4ddf3c
(chore): remove other packages + names for now
ilan-gold Oct 17, 2024
f6d963f
(chore): try eval failure block
ilan-gold Oct 17, 2024
18ce4d1
(chore): move eval blocks?
ilan-gold Oct 17, 2024
8459ea3
(chore): try removing `continue-on-error`
ilan-gold Oct 17, 2024
6e2d8c7
(fix): only do test failure on test failure
ilan-gold Oct 17, 2024
447dde1
(fix): use `success`
ilan-gold Oct 17, 2024
e888a9b
(fix): environemnt variable redirect
ilan-gold Oct 17, 2024
019b72b
(chore): fix env vars
ilan-gold Oct 17, 2024
09c4359
(fix): bad substitution
ilan-gold Oct 17, 2024
8809b00
(chore): use github token
ilan-gold Oct 17, 2024
d116e5f
(fix): env location
ilan-gold Oct 17, 2024
f0b632d
(fix): try different issue title
ilan-gold Oct 17, 2024
c4e92a7
(fix): try variable directly?
ilan-gold Oct 17, 2024
56de20b
(fix): ok back to quoting?
ilan-gold Oct 17, 2024
977f203
(fix): try redirection
ilan-gold Oct 17, 2024
d174b58
(fix): failure brackets, issue title, issue count check
ilan-gold Oct 17, 2024
33bb1f8
(fix): title is python dependent
ilan-gold Oct 17, 2024
8728ebe
(chore): add "python"
ilan-gold Oct 17, 2024
d48b9b2
(fix): try repo link
ilan-gold Oct 17, 2024
17fdd76
(fix): more text
ilan-gold Oct 17, 2024
5ce4a40
(chore): cut down line lenght
ilan-gold Oct 17, 2024
7fe0226
(chore): production ready
ilan-gold Oct 17, 2024
01afa80
(chore): better title
ilan-gold Oct 17, 2024
c8247c7
Apply suggestions from code review
ilan-gold Oct 17, 2024
f1d1b89
(refactor): constraints file
ilan-gold Oct 17, 2024
b20ef20
Merge branch 'ig/github_action' of github.com:scverse/integration-tes…
ilan-gold Oct 17, 2024
35ab95b
(fix): checkout `integration-testing`
ilan-gold Oct 17, 2024
566e923
(Fix): working directory
ilan-gold Oct 17, 2024
41bce22
(fix): try using `working-directory`
ilan-gold Oct 17, 2024
860f823
(chore): fix constraints/install
ilan-gold Oct 17, 2024
9d3ea8a
(fix): upper pin `mofapy2`
ilan-gold Oct 18, 2024
0e51462
(fix): lower bound mofapy2
ilan-gold Oct 18, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
101 changes: 101 additions & 0 deletions .github/workflows/integration-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
name: Integration test

on:
schedule:
- cron: "0 0 * * *" # Run daily at midnight UTC
push:
branches: [main]
pull_request:
branches: [main]

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
test:
strategy:
fail-fast: false
matrix:
python: ["3.10", "3.12"]
package: ["mudata", "spatialdata", "scirpy", "muon", "scanpy", "squidpy", "scvi-tools"]

defaults:
run:
shell: bash -el {0}

runs-on: ubuntu-latest

env:
# This env variable is used by the `gh` CLI
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

steps:

- uses: actions/checkout@v4
with:
fetch-depth: 0
filter: blob:none
path: integration-testing

- uses: actions/checkout@v4
with:
repository: scverse/${{ matrix.package }}
fetch-depth: 0
filter: blob:none
path: ${{ matrix.package }}

- name: Install Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}

- name: Install UV
uses: hynek/setup-cached-uv@v2

- name: Install AnnData + test dep
run: |
uv pip install --compile --system ".[test]" git+https://github.com/scverse/anndata -c ../integration-testing/constraints.txt -v
working-directory: ${{ matrix.package }}

- name: Set failure type for install
if: failure()
run: |
echo "Installation failed for ${{ matrix.package }}"
echo "failure_type=install" >> $GITHUB_ENV

- name: Env list
run: uv pip freeze

- name: Run test
run: |
pytest
working-directory: ${{ matrix.package }}

- name: Set failure type for test
if: failure() && env.failure_type != 'install'
run: |
echo "Test failed for ${{ matrix.package }}"
echo "failure_type=test" >> $GITHUB_ENV

- name: Check for open failure issue
if: failure() && github.event_name == 'schedule'
id: find_issue
run: |
ISSUE_TITLE="Integration Testing CI ${failure_type^} Failure on python ${{ matrix.python }}"
echo "Checking for existing issue: $ISSUE_TITLE"
ISSUE_COUNT=$(gh issue list --repo scverse/${{ matrix.package }} --state open --search "${ISSUE_TITLE}" --json number --jq 'length')
if [[ "$ISSUE_COUNT" -gt 0 ]]; then
echo "${failure_type^} failure issue already exists for today."
echo "issue_exists=true" >> $GITHUB_ENV
else
echo "issue_exists=false" >> $GITHUB_ENV
echo "issue_title=$ISSUE_TITLE" >> $GITHUB_ENV
fi

- name: Report failure issue
if: failure() && env.issue_exists == 'false' && github.event_name == 'schedule'
run: |
RUN_URL="${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
ISSUE_BODY="The daily CI failed on ${failure_type} for ${{ matrix.package }} failed. Please go to [the logs of the integration testing repo](${RUN_URL}) to review. @scverse/anndata"
gh issue create --repo scverse/${{ matrix.package }} --title "${{ env.issue_title }}" --body "${ISSUE_BODY}"
3 changes: 3 additions & 0 deletions constraints.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# uv backtracking is broken so we need to lower bound these
numba>=0.60.0
mofapy2>=0.7.1