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

ci: add downstream tests for altair + scikit-lego #533

Merged
merged 7 commits into from
Jul 16, 2024
Merged
Changes from 3 commits
Commits
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
46 changes: 46 additions & 0 deletions .github/workflows/downstream_tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: ci

on:
pull_request:
push:
branches: [main]
Comment on lines +3 to +6
Copy link
Member

@FBruzzesi FBruzzesi Jul 15, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shall we consider to run it it both as workflow dispatch (i.e. manual trigger) and dependency of publish to pypi, instead of every PR?
I am not sure if you intend to add scikit-lego as well, but test suite there typically take between 2 and 5 mins

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah that might be better

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure if you intend to add scikit-lego as well

I will take it as a yes πŸ˜‚
image

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

altair actually takes less than our own tests πŸ˜„ I think we might as well keep that on in CI

and for scikit-lego, perhaps some tests these could be marked "slow", and we just skip those here?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree! I think it is enough to run everything without extra dependencies as in our scheduled ci

TL;DR

run: pytest -n auto --disable-warnings --cov=sklego -m "not cvxpy and not formulaic and not umap"


jobs:
altair:
strategy:
matrix:
python-version: ["3.11"]
os: [ubuntu-latest]

runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Cache multiple paths
uses: actions/cache@v4
with:
path: |
~/.cache/pip
$RUNNER_TOOL_CACHE/Python/*
~\AppData\Local\pip\Cache
key: ${{ runner.os }}-build-${{ matrix.python-version }}
- name: clone-altair
run: git clone https://github.com/vega/altair.git
- name: install-basics
run: python -m pip install --upgrade tox virtualenv setuptools pip
- name: install-altair-dev
run: |
cd altair
pip install -e ".[dev, all]"
- name: show-deps
run: pip freeze
- name: Run pytest
run: |
cd altair
pytest tests
- name: Run mypy
run: |
cd altair
mypy altair tests
Loading