-
Notifications
You must be signed in to change notification settings - Fork 54
60 lines (56 loc) · 1.38 KB
/
pyci.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
on:
push:
branches: ['main']
pull_request:
workflow_dispatch:
name: Build
defaults:
run:
shell: bash
env:
RUFF_OUTPUT_FORMAT: github
jobs:
build:
name: Build tool
runs-on: ${{ matrix.os }}
strategy:
matrix:
os:
- 'ubuntu-latest'
- 'macos-latest'
- 'windows-latest'
python-version:
- '3.7'
- '3.8'
- '3.9'
- '3.10'
- '3.11'
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v2.2.2
with:
python-version: ${{matrix.python-version}}
# Only runs when key from caching step changes
- name: Install latest version of Poetry
if: steps.cache-poetry.outputs.cache-hit != 'true'
run: |
pip install poetry
# Poetry still needs to be re-prepended to the PATH on each run, since
# PATH does not persist between runs.
- name: Add Poetry to $PATH
run: |
echo "$HOME/.poetry/bin" >> $GITHUB_PATH
- name: Get Poetry version
run: poetry --version
- name: Install deps
if: steps.cache-deps.cache-hit != 'true'
run: |
make install
- name: run lint
run: make lint
- name: Run tests
run: make test
- name: Build artifacts
run: make build