-
Notifications
You must be signed in to change notification settings - Fork 10
55 lines (44 loc) · 1.46 KB
/
python-app.yml
File metadata and controls
55 lines (44 loc) · 1.46 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
# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: Build and Test
on: push
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Install uv
uses: astral-sh/setup-uv@61cb8a9741eeb8a550a1b8544337180c0fc8476b
with:
python-version: "3.10"
enable-cache: true
- name: Install project
run: uv sync --all-extras --dev
- name: Lint with Ruff
run: uv run ruff check src/
- name: Run tests
env:
GITHUB_TOKEN: ${{ secrets.TESTS_GITHUB_TOKEN }}
run: uv run pytest --cov=./ --cov-report=xml --durations=20 tests/
- name: Make sure the code can run
run: |
uv run folio-migration-tools -h
- name: Run the nox safety session
run: |
uvx nox -rs safety
- name: Upload coverage to Codecov
uses: codecov/[email protected]
with:
token: ${{ secrets.CODECOV_TOKEN }}
directory: ./
env_vars: OS,PYTHON
fail_ci_if_error: true
files: ./coverage.xml
flags: unittests
name: codecov-umbrella
verbose: true
- name: clone repo_template
uses: actions/checkout@master
with:
repository: FOLIO-FSE/migration_repo_template
path: ./migration_repo_template