-
Notifications
You must be signed in to change notification settings - Fork 1
65 lines (57 loc) · 2.02 KB
/
pr_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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
name: Run Tests
on:
workflow_dispatch:
issue_comment:
types: [created]
jobs:
tests-ubuntu-latest:
runs-on: ubuntu-latest
if: github.event.issue.pull_request && ${{ github.event.comment.body == '!test'}}
steps:
- name: Checkout
uses: actions/checkout@v2
with:
lfs: true
ref: github.event.issue.pull_request.commit_id
run: hub pr checkout ${{ github.event.issue.number }}
# - name: Set up Python
# uses: actions/setup-python@v2
# with:
# python-version: '3.9' # SemVer's version range syntax
# env:
# AGENT_TOOLSDIRECTORY: /opt/hostedtoolcache
# RUNNER_TOOL_CACHE: /opt/hostedtoolcache
- name: Install Python
run: |
sudo add-apt-repository -y ppa:deadsnakes/ppa
sudo apt-get update -y
sudo apt-get install -y python3.9
sudo apt install python3-pip -y
sudo apt-get install python3-tk -y
- name: Install dependencies
run: |
python3 -m pip install --upgrade pip
if [ -f requirements.txt ]; then python3 -m pip install -r requirements.txt; fi
if [ -f tests/requirements.txt ]; then python3 -m pip install -r tests/requirements.txt; fi
- name: Run Tests
run: python3 -m unittest discover -s tests -t tests
tests-windows-latest:
runs-on: windows-latest
if: github.event.issue.pull_request && ${{ github.event.comment.body == '!test'}}
steps:
- name: Checkout
uses: actions/checkout@v2
with:
lfs: true
ref: github.event.issue.pull_request.commit_id
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.9'
- name: Install dependencies
run: |
python3 -m pip install --upgrade pip
python3 -m pip install -r requirements.txt
python3 -m pip install -r tests\requirements.txt
- name: Run Tests
run: python3 -m unittest discover -s tests -t tests