-
Notifications
You must be signed in to change notification settings - Fork 0
64 lines (62 loc) · 2.05 KB
/
pull_request.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
---
name: Pull request workflow
on:
pull_request_target:
branches:
- main
jobs:
check-project-version:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
python-version: ['3.11']
outputs:
project_version: ${{ steps.get_project_version.outputs.project_version }}
steps:
- uses: actions/checkout@v2
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: Get a version of the project
id: get_project_version
run: echo "::set-output name=project_version::$(make get-project-version)"
- name: Install project requirements
run: make install-requirements
- name: Check project version
env:
ACCESS_TOKEN: ${{secrets.GIT_HUB_ACCESS_TOKEN}}
run: |
project-version check \
--provider=GitHub \
--organization=dmytrostriletskyi \
--repository=intentions \
--base-branch=main \
--head-branch=${{ github.head_ref }}
lint:
name: Lint the codebase (python-${{ matrix.python-version }} on ${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
python-version: ['3.11']
outputs:
project_version: ${{ steps.get_project_version.outputs.project_version }}
steps:
- uses: actions/checkout@v2
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: Get a version of the project
id: get_project_version
run: echo "::set-output name=project_version::$(make get-project-version)"
- name: Install project requirements
run: make install-requirements
- name: Check code quality
run: make check-code-quality