-
Notifications
You must be signed in to change notification settings - Fork 86
46 lines (42 loc) · 1.25 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
name: Python CI
on:
push:
branches: [ master ]
pull_request:
types:
- opened
- synchronize
- reopened
- ready_for_review
concurrency:
group: ci-check-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
if: github.event.pull_request.draft != true
strategy:
matrix:
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
steps:
- uses: actions/checkout@v4
- name: "Install Poetry"
run: "pip install poetry"
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: poetry
- name: Install dependencies
run: "poetry install --no-interaction --all-extras --with dev"
- run: "pip install pre-commit"
- uses: actions/cache@v4
with:
path: ~/.cache/pre-commit
key: pre-commit-3|${{ env.pythonLocation }}|${{ hashFiles('.pre-commit-config.yaml') }}
- name: "Run pre-commit"
run: poetry run pre-commit run --show-diff-on-failure --color=always --hook-stage push --all-files
- name: Coveralls
run: poetry run coveralls --service=github
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}