Skip to content

Commit

Permalink
Merge pull request #27 from paul-florentin-charles/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
paul-florentin-charles authored Sep 26, 2023
2 parents ccb13ef + 4196deb commit 9e1c8ab
Show file tree
Hide file tree
Showing 4 changed files with 56 additions and 5 deletions.
34 changes: 30 additions & 4 deletions .github/workflows/coveragepy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,46 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.9", "3.10"]
python-version: ["3.9"]
steps:
- uses: actions/checkout@v3

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install pytest
pip install coverage
pip install pytest coverage
- name: Running coverage report with coveragepy
run: |
coverage run -m pytest tst
coverage report
coverage report
- name: Coverage Badge
uses: tj-actions/coverage-badge-py@v2

- name: Verify Changed files
uses: tj-actions/verify-changed-files@v16
id: verify-changed-files
with:
files: coverage.svg

- name: Commit files
if: steps.verify-changed-files.outputs.files_changed == 'true'
run: |
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git add coverage.svg
git commit -m "Updated coverage.svg"
- name: Push changes
if: steps.verify-changed-files.outputs.files_changed == 'true'
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.github_token }}
branch: ${{ github.ref }}
5 changes: 4 additions & 1 deletion .github/workflows/pylint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,20 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.9", "3.10"]
python-version: ["3.9"]
steps:
- uses: actions/checkout@v3

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pylint
- name: Analysing the code with pylint
run: |
pylint $(git ls-files src/'*.py') --disable import-error
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# bcn-rainfall-models

[![coverage badge](coverage.svg)](https://github.com/nedbat/coveragepy)
[![linting: pylint](https://img.shields.io/badge/linting-pylint-yellowgreen)](https://github.com/pylint-dev/pylint)

🚧 WIP 🚧
Expand Down
21 changes: 21 additions & 0 deletions coverage.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 9e1c8ab

Please sign in to comment.