Testing Suite #5
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Unit testing application | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python 3.10 | |
uses: actions/setup-python@v3 | |
with: | |
python-version: "3.10" | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install pylint pycodestyle colorama pytest pytest-mock | |
- name: Install ctags | |
run: sudo apt-get update && sudo apt-get install -y exuberant-ctags | |
- name: Create test-results directory | |
run: mkdir -p test-results | |
- name: Test with pytest | |
run: | | |
pytest --junitxml=test-results/results.xml | |
- uses: actions/upload-artifact@v3 | |
if: always() | |
with: | |
name: pytest-results | |
path: test-results | |
retention-days: 30 |