-
Notifications
You must be signed in to change notification settings - Fork 1
45 lines (37 loc) · 1.15 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
name: CI - Lint and Test
on: pull_request
jobs:
lint:
name: Lint
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
arch: [x64]
python-version: ["3.10.x"]
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
architecture: ${{ matrix.arch }}
- name: Set up poetry and upgrade pip
run: pip install -U pip poetry
- name: Install this package
run: poetry install
- name: Lint source code
run: poetry run lint
- name: Lint pull request title
uses: amannn/action-semantic-pull-request@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
subjectPattern: ^(?![A-Z]).+$
subjectPatternError: |
The subject "{subject}" found in the pull request title "{title}"
didn't match the configured pattern. Please ensure that the subject
doesn't start with an uppercase character.
- name: Test
run: poetry run test