forked from mate-academy/py-restore-names
-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (35 loc) · 1.11 KB
/
test.yml
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
name: Test
on: [push, pull_request_target]
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v2
with:
ref: ${{github.event.pull_request.head.ref}}
repository: ${{github.event.pull_request.head.repo.full_name}}
- name: Set Up Python 3.10
uses: actions/setup-python@v2
with:
python-version: "3.10"
- name: Install pytest and flake8
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Run flake8
run: flake8 app/
- name: Run student tests
timeout-minutes: 5
run: pytest app/
- name: Run mentor tests
timeout-minutes: 5
run: pytest --numprocesses=auto tests/
- uses: mate-academy/auto-approve-action@v2
if: ${{ github.event.pull_request && success() }}
with:
github-token: ${{ github.token }}
- uses: mate-academy/auto-reject-action@v2
if: ${{ github.event.pull_request && failure() }}
with:
github-token: ${{ github.token }}