Update py_test #24
Workflow file for this run
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: "Static analysis & tests" | |
on: | |
push: | |
branches: [ "master" ] | |
pull_request: | |
jobs: | |
analysis: | |
runs-on: ubuntu-latest | |
name: Pylint Analysis | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.11' | |
cache: 'pip' | |
- name: Install dependencies | |
run: | | |
pip install -r requirements.txt | |
pip install pylint | |
- name: Analysing the code with pylint | |
run: | | |
pylint \ | |
--fail-under=6.0 \ | |
--ignore-patterns=test_.*?py \ | |
--max-line-length=180 \ | |
$(git ls-files '*.py') | |
python-tests: | |
env: | |
TEST_FILES: test/test_types.py test/test_metadata.py test/test_comparator.py | |
name: Run Python Tests | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.11' | |
cache: 'pip' | |
- name: Install dependencies | |
run: | | |
pip install -r requirements.txt | |
pip install coverage pytest | |
- name: Run tests | |
run: coverage run --source='similarity,column2Vec' -m pytest $TEST_FILES | |
- name: Show coverage | |
run: coverage report -m | |
- name: Create coverage file | |
run: coverage xml | |
- name: Get Cover | |
uses: orgoro/[email protected] | |
with: | |
coverageFile: coverage.xml | |
token: ${{ secrets.GITHUB_TOKEN }} | |
thresholdAll: 0.7 | |
thresholdNew: 0.9 | |
# - name: Collect coverage | |
# uses: codecov/codecov-action@v3 | |
# with: | |
# token: ${{ secrets.CODECOV_TOKEN }} | |
# fail_ci_if_error: true | |
# files: ./coverage.xml | |
# verbose: true | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: coverage | |
path: coverage.xml | |
retention-days: 1 |