Skip to content

Commit

Permalink
Create python-tester.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
KLPig authored Apr 13, 2024
1 parent f569c8a commit 9b7d0ee
Showing 1 changed file with 52 additions and 0 deletions.
52 changes: 52 additions & 0 deletions .github/workflows/python-tester.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,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: 'Testing pytest'
run: 'pytest'
- name: 'Run program using ${{ inputs.python-ver }}'
run: '${{ inputs.python-ver }} ${{ inputs.test-program }}'
- name: 'Run programme using pytest'
run: 'pytest ${{ inputs.test-program }}'


0 comments on commit 9b7d0ee

Please sign in to comment.