Update test-and-lint.yml #6
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: Test & Linting | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
name: Run Tests | |
container: | |
image: sudilav1/martepy:latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Run pytest | |
run: | | |
pytest --cov=martepy --cov-report=term --cov-report=html:cov_html --cov-fail-under=90 --junit-xml=test_report.xml | |
- name: Upload Coverage Report | |
uses: actions/upload-artifact@v4.4.3 | |
with: | |
name: coverage-report | |
path: cov_html/ | |
retention-days: 30 | |
linting: | |
runs-on: ubuntu-latest | |
name: Code Linting | |
container: | |
image: sudilav1/martepy:latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Run pylint | |
run: pylint martepy | |