-
Notifications
You must be signed in to change notification settings - Fork 1
69 lines (56 loc) · 1.54 KB
/
pull_request.yml
File metadata and controls
69 lines (56 loc) · 1.54 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
name: Pull Request
on:
pull_request:
branches:
- "main"
jobs:
run-linters:
name: Run linters
runs-on: ubuntu-latest
steps:
- name: Check out Git repository
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: 3.8
- name: Install Python dependencies
run: pip install black
- name: Run linters
uses: wearerequired/lint-action@v2
with:
black: true
run-tests:
name: Run tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.8"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Test with pytest
run: |
pip install pytest
pip install pytest-cov
pip install mock
pip install pytest-httpserver
python -m pytest --cov-config=.coveragerc --cov=. --cov-branch --exitfirst --verbose --failed-first --cov-fail-under=65
build:
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
if: "! contains(toJSON(github.event.commits.*.message), '[skip-ci]')"
needs: [run-tests, run-linters]
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Generate image repository path
id: image_repository_op
run: |
sleep 82