-
Notifications
You must be signed in to change notification settings - Fork 0
65 lines (50 loc) · 1.64 KB
/
ci.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
name: Run CI checks
on:
- push
- workflow_call
env:
CI_POETRY_VERSION: "1.8.3"
jobs:
ci-checks:
runs-on: ubuntu-22.04
steps:
- name: Check out source tree
uses: actions/checkout@v4
- name: Load cached Poetry installation
id: load-cached-poetry
uses: actions/cache@v4
with:
path: ~/.local
key: poetry-release-v${{ env.CI_POETRY_VERSION }}
- name: Update PATH
if: steps.load-cached-poetry.outputs.cache-hit == 'true'
run: |
echo ~/.local/bin >> "${GITHUB_PATH}"
- name: Install Poetry
uses: snok/install-poetry@v1
if: steps.load-cached-poetry.outputs.cache-hit != 'true'
with:
version: ${{ env.CI_POETRY_VERSION }}
virtualenvs-create: true
virtualenvs-in-project: true
- name: Print current package version
run: poetry version --no-ansi --no-interaction
- name: Use specified Python version
uses: actions/setup-python@v5
with:
cache: poetry
python-version-file: .python-version
- name: Install dependencies
# See also:
# https://github.com/python-poetry/poetry/issues/7184
run: poetry install --no-ansi --no-interaction --no-root
- name: Install target package
run: poetry install --no-ansi --no-interaction
- name: Run static typechecking
run: poetry run poe typecheck
- name: Run linter
run: poetry run poe linter
- name: Run unit tests
run: poetry run poe tests
- name: Run man page and HTML documentation generator
run: poetry run poe doc