-
Notifications
You must be signed in to change notification settings - Fork 4
141 lines (115 loc) · 3.79 KB
/
ci.yml
File metadata and controls
141 lines (115 loc) · 3.79 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
name: "Continuous integration"
on:
pull_request:
push:
branches: [main]
tags: [v*]
jobs:
test:
name: "Test Python ${{ matrix.python-version }} on ${{ matrix.os }}"
runs-on: ${{ matrix.os }}
permissions:
contents: read
id-token: write
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
python-version:
["3.8", "3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]
include:
- os: ubuntu-22.04
python-version: "3.7"
- os: windows-latest
python-version: "3.14"
- os: macos-latest
python-version: "3.14"
steps:
- name: "Check out repository"
uses: actions/checkout@v6
- name: "Set up virtual environment"
uses: ./.github/actions/setup
with:
python-version: ${{ matrix.python-version }}
- name: "Run tests"
shell: bash
run: poe test-ci
- name: "Upload coverage report"
uses: codecov/codecov-action@v6
with:
use_oidc: true
check:
name: "Lint and type checks"
runs-on: ubuntu-latest
steps:
- name: "Check out repository"
uses: actions/checkout@v6
- name: "Set up virtual environment"
uses: ./.github/actions/setup
- name: "Check types, lints, and formatting"
run: poe check-ci
build-package:
name: Build package
runs-on: ubuntu-latest
steps:
- name: "Check out repository"
uses: actions/checkout@v6
- name: "Set up virtual environment"
uses: ./.github/actions/setup
- name: "Build"
run: poe build-package
- name: "Upload"
uses: actions/upload-artifact@v6
with:
name: package
path: ./dist
build-docs:
name: Build docs
runs-on: ubuntu-latest
steps:
- name: "Check out repository"
uses: actions/checkout@v6
- name: "Set up virtual environment"
uses: ./.github/actions/setup
- name: "Build"
run: poe build-docs
- name: "Upload"
uses: actions/upload-pages-artifact@v4
with:
path: ./site
deploy-package:
name: Deploy package to PyPI
runs-on: ubuntu-latest
needs: [build-package, check, test]
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
environment:
name: pypi
url: https://pypi.org/p/decoy
permissions:
id-token: write
contents: read
steps:
- name: "Check out repository"
uses: actions/checkout@v6
- name: "Download package artifact"
uses: actions/download-artifact@v7
with:
name: package
path: ./dist
- name: "Publish"
uses: pypa/gh-action-pypi-publish@ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e # v1.13.0
deploy-docs:
name: Deploy docs to GitHub Pages
runs-on: ubuntu-latest
needs: [build-docs, check, test]
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
permissions:
id-token: write
pages: write
steps:
- name: Deploy
id: deployment
uses: actions/deploy-pages@v4