-
Notifications
You must be signed in to change notification settings - Fork 0
57 lines (53 loc) · 1.51 KB
/
integrate.yml
File metadata and controls
57 lines (53 loc) · 1.51 KB
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
name: CI
on:
pull_request:
branches: [main]
defaults:
run:
shell: bash
jobs:
pre-commit-check:
name: Pre-Commit Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.11"
- uses: pre-commit/action@v3.0.1
python-check:
name: Python Check
needs: pre-commit-check
strategy:
fail-fast: false
matrix:
platform: [ubuntu-latest, macos-latest, windows-latest]
python-version: ["3.11"]
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- id: cache-dependencies
name: Cache dependencies
uses: actions/cache@v4
with:
path: ${{ github.workspace }}/.venv
key: ${{ matrix.os }}-${{ hashFiles('**/poetry.lock') }}
restore-keys: ${{ matrix.os }}-
- name: Install dependencies
if: steps.cache-dependencies.outputs.cache-hit != 'true'
run: |
python -m pip install --upgrade pip poetry
poetry --version
poetry check --no-interaction
poetry config virtualenvs.in-project true
poetry install --no-interaction
- name: Run tests
run: |
poetry run pytest -v
- name: Build artifacts
run: |
poetry build --no-interaction