-
Notifications
You must be signed in to change notification settings - Fork 0
71 lines (62 loc) · 1.71 KB
/
ci_pipeline.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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
---
name: CI Pipeline
"on":
push:
branches: [main]
pull_request:
branches: [main]
paths:
- tail_jsonl/**
- tests/**
- poetry.lock
- pyproject.toml
env:
# On Windows, snapshots are skipped because of subtle differences in whitespace
PYTEST_ADDOPTS: "--snapshot-warn-unused"
jobs:
lint:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
python-version: ["3.9"]
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup
with:
os: ${{ matrix.os }}
python-version: ${{ matrix.python-version }}
- name: Run static linters
run: poetry run calcipy-lint lint.check
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest, windows-latest]
python-version: ["3.9"]
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup
with:
os: ${{ matrix.os }}
python-version: ${{ matrix.python-version }}
- name: Run test
run: poetry run calcipy-test test.pytest
typecheck:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
python-version: ["3.9"]
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup
with:
os: ${{ matrix.os }}
python-version: ${{ matrix.python-version }}
- name: Run typecheck
run: poetry run calcipy-types types.mypy
# Based on: https://github.com/jakebailey/pyright-action/issues/10#issuecomment-1455220629
- name: Add Poetry Python to Path
run: echo "$(poetry env info --path)/bin" >> $GITHUB_PATH
- uses: jakebailey/pyright-action@v2