-
Notifications
You must be signed in to change notification settings - Fork 5
78 lines (73 loc) · 2.19 KB
/
ci.yaml
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
66
67
68
69
70
71
72
73
74
75
76
77
78
---
name: CI
on:
# Allow this config to be reused by other workflows in the repo
workflow_call:
pull_request:
branches: [main]
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- run: pipx install poetry
- uses: actions/setup-python@65d7f2d534ac1bc67fcd62888c5f4f3d2cb2b236 # v4
with:
python-version: ${{ matrix.python-version }}
cache: poetry
- run: |
poetry install
poetry run pre-commit run -a
test:
name: Test
runs-on: ubuntu-latest
needs: lint
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- run: pipx install poetry
- uses: actions/setup-python@65d7f2d534ac1bc67fcd62888c5f4f3d2cb2b236 # v4
with:
python-version: ${{ matrix.python-version }}
cache: poetry
- env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
poetry install
poetry run pytest --cov
coveralls
# - uses: MishaKav/pytest-coverage-comment@main
autoapprove:
name: Renovate / Approve
needs: [lint, test]
runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write
if: github.actor == 'renovatebot' || github.actor == 'renovate[bot]'
steps:
- name: Auto-approve
uses: hmarr/auto-approve-action@44888193675f29a83e04faf4002fa8c0b537b1e4 # v3.2.1
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
automerge:
name: Renovate / Merge
needs: autoapprove
runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write
if: github.actor == 'renovatebot' || github.actor == 'renovate[bot]'
steps:
- name: Auto-merge
uses: pascalgn/automerge-action@22948e0bc22f0aa673800da838595a3e7347e584 # v0.15.6
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
MERGE_LABELS: dependencies
MERGE_METHOD: rebase