-
Notifications
You must be signed in to change notification settings - Fork 4
61 lines (51 loc) · 1.36 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
name: CI
on:
pull_request:
push:
branches:
- "main"
tags:
- "*"
jobs:
build:
strategy:
matrix:
include:
- python_version: "3.8"
script: tests
- python_version: "3.9"
script: tests
- python_version: "3.10"
script: tests
- python_version: "3.11"
script: tests
name: "py${{ matrix.python_version }} / ${{ matrix.script }}"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
id: setup-python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python_version }}
- name: Pip, Pre-commit & Poetry caches
uses: actions/cache@v2
with:
path: |
~/.cache/
key: ${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('poetry.lock') }}-${{ hashFiles('.pre-commit-config.yaml') }}
- name: Install Poetry
run: pip install poetry
- name: Install Dev dependencies
run: poetry install
- name: Run ${{ matrix.script }}
run: poetry run scripts/${{ matrix.script }}
env:
PYTEST_ADDOPTS: "--cov-report=xml"
report-status:
name: success
runs-on: ubuntu-latest
needs: build
steps:
- name: Report success
run: echo 'Success !'