-
Notifications
You must be signed in to change notification settings - Fork 53
56 lines (45 loc) · 1.26 KB
/
unittests.yml
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
name: Unittests
on:
# Allow to trigger the workflow manually (e.g. when deps changes)
workflow_dispatch:
# Run on pushes to main
push:
branches:
- main
# Run on pull requests to main (including test branches)
pull_request:
branches:
- main
jobs:
unittest-job:
runs-on: ubuntu-latest
timeout-minutes: 30
concurrency:
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.ref }}-${{ github.head_ref || 'none' }}
cancel-in-progress: true
steps:
- uses: actions/checkout@v3
# Install deps
- uses: actions/setup-python@v4
with:
python-version: 3.10.14
# Uncomment to cache of pip dependencies (if tests too slow)
# cache: pip
# cache-dependency-path: '**/pyproject.toml'
- uses: astral-sh/setup-uv@v3
with:
version: "0.4.17"
- name: Install dependencies
run: |
uv sync --locked --extra extras --extra dev
# Check formatting
- name: Check pyink formatting
run: uv run pyink penzai tests --check
- name: Run pylint
run: uv run pylint penzai
# Run tests
- name: Run tests
run: uv run python run_tests.py
# Run typechecker
- name: Run pytype
run: uv run pytype --jobs auto penzai