-
Notifications
You must be signed in to change notification settings - Fork 0
94 lines (80 loc) · 2.38 KB
/
Copy pathtest.yml
File metadata and controls
94 lines (80 loc) · 2.38 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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
name: Test
on:
push:
branches: # on all branches except `typos`
- '**'
- '!typos'
paths-ignore:
- 'docs/**'
- 'examples/**'
- 'data/**'
- '.git*'
- 'README.md'
pull_request:
branches:
- '**'
schedule: # Every Monday at 04:00 UTC
- cron: '0 4 * * 1'
jobs:
caching:
strategy:
matrix:
python-version: ["3.12"]
os: [ ubuntu-latest ]
fail-fast: false
env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
defaults:
run:
shell: bash -elo pipefail {0}
name: Cache for ${{ matrix.python-version }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v6
- name: Get week number
run: echo "WEEK=$(date +'%V')" >> $GITHUB_ENV
- name: Set up Python ${{ matrix.python-version }}
uses: mamba-org/setup-micromamba@v2
with:
create-args: python=${{ matrix.python-version }}
environment-file: environment-dev.yml
cache-environment: true
cache-environment-key: W${{ env.WEEK }}
run-tests:
needs: caching
strategy:
matrix:
python-version: ["3.12"]
os: [ ubuntu-latest ]
submodule:
- {
name: "Functions",
pytest_args: "tests/test_functions.py" }
fail-fast: false
name: ${{ matrix.submodule.name }} (${{ matrix.python-version }} on ${{ matrix.os }})
runs-on: ${{ matrix.os }}
timeout-minutes: 60
defaults:
run:
shell: bash -el {0}
steps:
- uses: actions/checkout@v6
- name: Get week number
run: echo "WEEK=$(date +'%V')" >> $GITHUB_ENV
- name: Set up Python ${{ matrix.python-version }}
uses: mamba-org/setup-micromamba@v2
with:
create-args: python=${{ matrix.python-version }}
environment-file: environment-dev.yml
cache-environment: true
cache-environment-key: W${{ env.WEEK }}
- name: Install fixbikenet
run: pip install --no-build-isolation --no-deps -e .
- name: "Run tests ${{ matrix.submodule.name }}"
run: |
pytest ${{ matrix.submodule.pytest_args }} --cov --cov-branch --cov-report=xml
- name: Upload results to Codecov
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
slug: BikeNetKit/FixBikeNet