-
Notifications
You must be signed in to change notification settings - Fork 0
38 lines (31 loc) · 810 Bytes
/
pr.yml
File metadata and controls
38 lines (31 loc) · 810 Bytes
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
name: PR Checks
on:
pull_request:
types: [opened, synchronize]
jobs:
print_context:
runs-on: ubuntu-latest
steps:
- name: Print GitHub Event Context
continue-on-error: true
run: echo "${{ toJson(github.event) }}"
test:
runs-on: ubuntu-latest
if: github.event.pull_request.author_association == 'OWNER'
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: 3.9
- name: Install dependencies
run: |
pip install -U pip
pip install black flake8 pytest
- name: Check code formatting and style
run: |
black --check .
flake8 .
- name: Run tests
run: pytest