Run tests in GitHub Actions container

This commit is contained in:
Daniel Milnes 2023-10-01 15:59:58 +01:00
parent 71a88a8c8c
commit b33995c9d8
No known key found for this signature in database
GPG key ID: 1701097BBDD44D1B
2 changed files with 39 additions and 1 deletions

37
.github/workflows/test.yaml vendored Normal file
View file

@ -0,0 +1,37 @@
name: Python Tests
on:
- push
jobs:
test:
runs-on: ubuntu-latest
container:
image: ubuntu:22.04
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: 3.11
- name: Install binary dependencies
run: apt update && apt install -y git bzr fossil mercurial subversion
env:
DEBIAN_FRONTEND: noninteractive
- name: Install Python dependencies
run: python -m pip install -r requirements-dev.txt
- name: Run Python Tests
run: python -m pytest --junitxml=test-results.xml
- name: Publish Test Report
uses: mikepenz/action-junit-report@v4
if: success() || failure() # always run even if the previous step fails
with:
report_paths: 'test-results.xml'

View file

@ -2,3 +2,4 @@ nose>=1.3.7
mock>=1.3.0
sh>=1.11
parameterized>=0.6.1
pytest