Skip to content

Commit 54faedc

Browse files
authored
Add pytest action
1 parent 389f95c commit 54faedc

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

.github/workflows/run-tests.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# This workflow will install Python dependencies, run tests and lint with a single version of Python
2+
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
3+
4+
name: Python application
5+
6+
on:
7+
push:
8+
branches: [ "main" ]
9+
pull_request:
10+
branches: [ "main" ]
11+
workflow_dispatch:
12+
13+
permissions:
14+
contents: read
15+
16+
jobs:
17+
build:
18+
19+
runs-on: ubuntu-latest
20+
21+
steps:
22+
- uses: actions/checkout@v5
23+
- name: Set up Python
24+
uses: actions/setup-python@v5
25+
with:
26+
python-version: '3.x'
27+
- name: Install dependencies
28+
run: |
29+
python -m pip install --upgrade pip
30+
pip install requests
31+
- name: Test with pytest
32+
run: |
33+
pip install pytest pytest-cov
34+
pytest -q --doctest-modules --junitxml=junit/test-results.xml --cov=com --cov-report=xml --cov-report=html
35+

0 commit comments

Comments
 (0)