Repository navigation
61 lines (57 loc) · 1.67 KB
/
Copy pathbenchopt_test.yml
File metadata and controls
61 lines (57 loc) · 1.67 KB
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
name: Test benchopt
on:
push:
branches:
- main
tags:
- '**'
pull_request:
schedule:
# Run every 1st of the month at 7:42am UTC.
- cron: '42 7 1 * *'
jobs:
find-benchmarks:
runs-on: ubuntu-latest
outputs:
benchmark-dirs: ${{ steps.find-dirs.outputs.dirs }}
found_benchmarks: ${{ steps.find-dirs.outputs.found_benchmarks }}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.14'
- name: Install dependencies
run: pip install GitPython
- name: Find benchmark directories
id: find-dirs
run: python .github/scripts/find_benchmarks.py
env:
GITHUB_SHA: ${{ github.sha }}
GITHUB_EVENT_NAME: ${{ github.event_name }}
GITHUB_EVENT_BEFORE: ${{ github.event.before }}
GITHUB_BASE_REF: ${{ github.event.pull_request.base.ref }}
benchopt-tests:
needs: find-benchmarks
if : needs.find-benchmarks.outputs.found_benchmarks == 'True'
strategy:
matrix:
benchmark_dir: ${{ fromJson(needs.find-benchmarks.outputs.benchmark-dirs) }}
uses: benchopt/template_benchmark/.github/workflows/test_benchmarks.yml@main
with:
benchopt_branch: benchopt@main
benchmark_dir: ${{ matrix.benchmark_dir }}
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install Black
run: pip install black
- name: Run Black check
run: black --check .