Skip to content

Commit cf60bd3

Browse files
committed
ci: Add end-to-end workflow
1 parent 978f34e commit cf60bd3

File tree

3 files changed

+92
-0
lines changed

3 files changed

+92
-0
lines changed

.github/workflows/end-to-end.yml

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
name: end-to-end
2+
3+
on: [pull_request] # ??
4+
5+
concurrency:
6+
group: ${{ github.workflow }}-${{ github.ref }}
7+
cancel-in-progress: true
8+
9+
permissions: {}
10+
11+
defaults:
12+
run:
13+
shell: bash
14+
15+
jobs:
16+
end-to-end:
17+
runs-on: ubuntu-latest
18+
permissions:
19+
contents: read
20+
steps:
21+
- name: Checkout code
22+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
23+
24+
- name: Setup Python
25+
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
26+
id: setup-python
27+
with:
28+
python-version: 3.13
29+
check-latest: True
30+
cache: pip
31+
32+
- name: Restore python-venv
33+
uses: actions/cache/restore@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
34+
id: cache-python-venv
35+
with:
36+
path: venv/
37+
key: >-
38+
python-venv
39+
-ubuntu-latest
40+
-3.13
41+
-${{ hashFiles('ci/requirements/skore/python-3.13/scikit-learn-1.7/test-requirements.txt') }}
42+
-${{ hashFiles('ci/requirements/skore-hub-project/python-3.13/scikit-learn-1.7/test-requirements.txt') }}
43+
-${{ hashFiles('ci/requirements/skore-local-project/python-3.13/scikit-learn-1.7/test-requirements.txt') }}
44+
45+
- name: Setup python-venv
46+
run: |
47+
set -eu
48+
49+
# Ensure venv is created
50+
python -m venv venv
51+
52+
# Activate venv for each step depending on the OS
53+
echo "${GITHUB_WORKSPACE}/venv/bin" >> ${GITHUB_PATH}
54+
echo "VIRTUAL_ENV=${GITHUB_WORKSPACE}/venv" >> ${GITHUB_ENV}
55+
56+
- name: Install dependencies in python-venv
57+
if: steps.cache-python-venv.outputs.cache-hit != 'true'
58+
run: |
59+
python -m pip install --upgrade pip build
60+
61+
for package in 'skore' 'skore-hub-project' 'skore-local-project' ; do
62+
python -m pip install --requirement "ci/requirements/${package}/python-3.13/scikit-learn-1.7/test-requirements.txt"
63+
done
64+
65+
- name: Save python-venv
66+
uses: actions/cache/save@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
67+
if: steps.cache-python-venv.outputs.cache-hit != 'true'
68+
with:
69+
path: venv/
70+
key: ${{ steps.cache-python-venv.outputs.cache-primary-key }}
71+
72+
- name: Build and install
73+
run: |
74+
for package in 'skore' 'skore-hub-project' 'skore-local-project'; do
75+
(
76+
cd "${package}/"
77+
78+
# build
79+
python -m build
80+
81+
# install
82+
wheel=(dist/*.whl); python -m pip install --force-reinstall --no-deps "${wheel}"
83+
)
84+
done
85+
86+
- name: Test
87+
timeout-minutes: 10
88+
working-directory: tests/end-to-end
89+
run: python -m pytest --import-mode=importlib --no-header --verbosity=2 --dist=loadscope --numprocesses auto --no-cov

tests/end-to-end/conftest.py

Whitespace-only changes.

tests/end-to-end/test_import.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import skore
2+
import skore_hub_project
3+
import skore_local_project

0 commit comments

Comments
 (0)