Feature/1 initial repository setup #18
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/[email protected] | |
- name: Set up Python | |
uses: actions/[email protected] | |
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: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/[email protected] | |
- name: Set up Python | |
uses: actions/[email protected] | |
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 | |
- 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 |