-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (48 loc) · 1.28 KB
/
python-tester.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
name: Python Tester
run-name: PyTesting
on:
workflow_dispatch:
inputs:
os:
type: choice
required: true
default: ubuntu
options:
- macos
- windows
- ubuntu
python-ver:
type: choice
required: true
default: python3
options:
- python3
- python
test-program:
type: string
required: true
default: main.py
jobs:
env-test:
name: Enviroment Testing
runs-on: '${{ inputs.os }}-latest'
steps:
- name: 'Testing ${{ inputs.python-ver }}'
run: '${{ inputs.python-ver }} -v'
- name: 'Testing pip'
run: '${{ inputs.python-ver }} -m pip -v'
run:
needs: env-test
name: Running
runs-on: '${{ inputs.os }}-latest'
steps:
- name: 'Upgrade pip'
run: '${{ inputs.python-ver }} -m pip install --upgrade pip'
- name: 'Install pytest'
run: '${{ inputs.python-ver }} -m pip install pytest'
- name: 'Installing required packages'
run: '${{ inputs.python-ver }} -m pip install pygame'
- name: 'Run program using ${{ inputs.python-ver }}'
run: '${{ inputs.python-ver }} ${{ inputs.test-program }}'
- name: 'Run programme using pytest'
run: 'pytest ${{ inputs.test-program }}'