-
Notifications
You must be signed in to change notification settings - Fork 27
53 lines (47 loc) · 1.72 KB
/
check.yml
File metadata and controls
53 lines (47 loc) · 1.72 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
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions.
# Based upon:
# https://github.com/actions/starter-workflows/blob/main/ci/python-package.yml
# As directed from:
# https://docs.github.com/en/actions/guides/building-and-testing-python#starting-with-the-python-workflow-template
on:
workflow_dispatch:
pull_request:
push:
branches:
- main
permissions: {}
jobs:
check:
permissions:
contents: read
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13', '3.14']
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
with:
submodules: 'recursive'
persist-credentials: false
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
id: setup-python
with:
python-version: ${{ matrix.python-version }}
- name: Install uv
uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7
with:
enable-cache: true
- uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
name: Define a cache for the virtual environment based on the dependencies lock file
id: cache
with:
path: ./.venv
key: venv-${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('uv.lock') }}
- name: Install dependencies
run: uv sync --extra crypto --extra dev
- name: Generate rest sync code and tests
run: uv run unasync
- name: Test with pytest
run: uv run pytest --verbose --tb=short --capture=no