Skip to content

Commit 79bc667

Browse files
authored
Merge branch 'main' into test-artifacts
2 parents f055a02 + 76c913a commit 79bc667

14 files changed

+451
-222
lines changed

.github/workflows/backend.yml

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
name: backend
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- 'skore/src/**'
7+
- 'skore/tests/**'
8+
- 'skore/pyproject.toml'
9+
- 'skore/requirements*.txt'
10+
- '.github/workflows/backend.yml'
11+
push:
12+
branches:
13+
- main
14+
15+
concurrency:
16+
group: ${{ github.workflow }}-${{ github.ref }}
17+
cancel-in-progress: true
18+
19+
permissions:
20+
contents: read
21+
22+
defaults:
23+
run:
24+
shell: "bash"
25+
26+
jobs:
27+
backend-lint:
28+
runs-on: "ubuntu-latest"
29+
steps:
30+
- name: Checkout code
31+
uses: actions/checkout@v4
32+
33+
- name: Setup Python
34+
uses: actions/setup-python@v5
35+
with:
36+
python-version: "3.12"
37+
cache: pip
38+
39+
- name: Install dependencies
40+
run: python -m pip install --upgrade pip pre-commit
41+
42+
- name: Lint
43+
working-directory: skore/
44+
run: pre-commit run --all-files ruff
45+
46+
backend-test:
47+
strategy:
48+
fail-fast: true
49+
matrix:
50+
os: ["ubuntu-latest", "windows-latest"]
51+
python: ["3.9", "3.10", "3.11", "3.12"]
52+
include:
53+
- os: "ubuntu-latest"
54+
python: "3.12"
55+
coverage: true
56+
runs-on: ${{ matrix.os }}
57+
steps:
58+
- name: Checkout code
59+
uses: actions/checkout@v4
60+
61+
- name: Setup Python
62+
uses: actions/setup-python@v5
63+
with:
64+
python-version: ${{ matrix.python }}
65+
cache: pip
66+
67+
- name: Install dependencies
68+
run: python -m pip install --upgrade pip build
69+
70+
- name: Build
71+
working-directory: skore/
72+
run: python -m build
73+
74+
- name: Install
75+
working-directory: skore/
76+
run: wheel=(dist/*.whl); python -m pip install "${wheel}[test]"
77+
78+
- name: Test without coverage
79+
if: ${{ ! matrix.coverage }}
80+
timeout-minutes: 10
81+
working-directory: skore/
82+
run: python -m pytest -n auto --no-cov src/ tests/
83+
84+
- name: Test with coverage
85+
if: ${{ matrix.coverage }}
86+
timeout-minutes: 10
87+
working-directory: skore/
88+
run: |
89+
mkdir coverage
90+
python -m pytest -n auto --junitxml=coverage/coverage.xml --cov=skore src/ tests/ | tee coverage/coverage.txt
91+
92+
- name: Upload coverage reports
93+
if: ${{ matrix.coverage && (github.event_name == 'pull_request') }}
94+
uses: actions/upload-artifact@v4
95+
with:
96+
name: backend-coverage
97+
path: skore/coverage/

.github/workflows/ci.yml

Lines changed: 0 additions & 69 deletions
This file was deleted.

.github/workflows/frontend.yml

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
name: frontend
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- 'skore-ui/**'
7+
- '.github/workflows/frontend.yml'
8+
push:
9+
branches:
10+
- main
11+
12+
concurrency:
13+
group: ${{ github.workflow }}-${{ github.ref }}
14+
cancel-in-progress: true
15+
16+
permissions:
17+
contents: read
18+
19+
defaults:
20+
run:
21+
shell: "bash"
22+
23+
jobs:
24+
frontend-lint:
25+
runs-on: ubuntu-latest
26+
steps:
27+
- name: Checkout code
28+
uses: actions/checkout@v4
29+
30+
- name: Setup Node
31+
uses: actions/setup-node@v4
32+
with:
33+
node-version: '20'
34+
cache: 'npm'
35+
cache-dependency-path: skore-ui/package-lock.json
36+
37+
- name: Lint
38+
working-directory: skore-ui/
39+
run: |
40+
npm install
41+
npm run type-check
42+
npm run lint
43+
npm run format
44+
npm run style-lint
45+
46+
frontend-test:
47+
runs-on: ubuntu-latest
48+
steps:
49+
- name: Checkout code
50+
uses: actions/checkout@v4
51+
52+
- name: Setup Node
53+
uses: actions/setup-node@v4
54+
with:
55+
node-version: '20'
56+
cache: 'npm'
57+
cache-dependency-path: skore-ui/package-lock.json
58+
59+
- name: Test with coverage
60+
working-directory: skore-ui/
61+
run: |
62+
npm install
63+
npm run test:unit:coverage
64+
65+
- name: Upload coverage reports
66+
if: ${{ github.event_name == 'pull_request' }}
67+
uses: actions/upload-artifact@v4
68+
with:
69+
name: frontend-coverage
70+
path: skore-ui/coverage/
71+
72+
frontend-build:
73+
runs-on: ubuntu-latest
74+
steps:
75+
- name: Checkout code
76+
uses: actions/checkout@v4
77+
78+
- name: Setup Node
79+
uses: actions/setup-node@v4
80+
with:
81+
node-version: '20'
82+
cache: 'npm'
83+
cache-dependency-path: skore-ui/package-lock.json
84+
85+
- name: Build
86+
working-directory: skore-ui/
87+
run: |
88+
npm install
89+
npm run build

.github/workflows/lint.yml

Lines changed: 30 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,40 @@
1-
name: Reusable lint workflow
1+
name: lint
22

3-
on: [workflow_call]
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- main
8+
9+
concurrency:
10+
group: ${{ github.workflow }}-${{ github.ref }}
11+
cancel-in-progress: true
12+
13+
permissions:
14+
contents: read
15+
16+
defaults:
17+
run:
18+
shell: "bash"
419

520
jobs:
6-
lint-all-files:
21+
lint:
722
runs-on: ubuntu-latest
823
steps:
9-
- uses: actions/checkout@v4
10-
- uses: actions/setup-python@v5
24+
- name: Checkout code
25+
uses: actions/checkout@v4
26+
27+
- name: Setup Python
28+
uses: actions/setup-python@v5
1129
with:
12-
python-version: '3.12'
13-
cache: 'pip'
14-
- name: Lint all files
15-
run: |
16-
python -m pip install --upgrade pip
17-
python -m pip install --upgrade pre-commit
30+
python-version: "3.12"
31+
cache: pip
32+
33+
- name: Install dependencies
34+
run: python -m pip install --upgrade pip pre-commit
1835

36+
- name: Lint
37+
run: |
1938
pre-commit run --all-files check-yaml
2039
pre-commit run --all-files check-toml
2140
pre-commit run --all-files check-added-large-files

.github/workflows/add-pr-assignee.yml renamed to .github/workflows/pr-add-assignee.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
1-
name: Add PR assignee
1+
name: add assignee in PR
22

33
on:
4-
pull_request:
4+
pull_request_target:
55
types: [opened]
66

7+
permissions: {}
8+
79
jobs:
8-
add-pr-assignee:
10+
add-assignee:
911
runs-on: ubuntu-latest
1012
permissions:
1113
pull-requests: write

0 commit comments

Comments
 (0)