-
Notifications
You must be signed in to change notification settings - Fork 19
53 lines (44 loc) · 1.51 KB
/
Copy pathpython_unit_tests.yaml
File metadata and controls
53 lines (44 loc) · 1.51 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
# -----------------------------------------------------------------------------
# (C) Crown copyright Met Office. All rights reserved.
# The file LICENCE, distributed with this code, contains details of the terms
# under which the code may be used.
# -----------------------------------------------------------------------------
name: Python Unit Tests
on:
pull_request:
paths:
- '**.py'
- '.github/workflows/python_unit_tests.yaml'
push:
paths:
- '**.py'
- '.github/workflows/python_unit_tests.yaml'
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
permissions:
contents: read # Required to evaluate the event trigger metadata safely
jobs:
python_unit_tests:
name: python_unit_tests
runs-on: ubuntu-24.04
timeout-minutes: 5
steps:
- name: Checkout code
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
persist-credentials: false
- name: Set up uv with Python
uses: astral-sh/setup-uv@11f9893b081a58869d3b5fccaea48c9e9e46f990 # v8.3.2
with:
python-version: '3.14'
enable-cache: true
- name: Install dependencies
run: uv sync --extra test
- name: Test with pytest
run: |
# Setup git for git_bdiff and get_git_sources testing
git config --global user.name 'Testing'
git config --global user.email 'Testing'
uv run pytest -vv