Skip to content

Commit f1bdbf3

Browse files
committed
New Analysis action.
1 parent ddd5531 commit f1bdbf3

File tree

1 file changed

+27
-11
lines changed

1 file changed

+27
-11
lines changed
Lines changed: 27 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Static analysis
1+
name: Analysis & Coverage
22

33
on:
44
pull_request:
@@ -22,27 +22,43 @@ jobs:
2222
filters: |
2323
py_src:
2424
- 'pillow_heif/*.py'
25+
- 'libheif/*.py'
2526
26-
python-pylint:
27-
needs: changes
27+
build-analysis:
28+
needs: [changes]
2829
if: ${{ needs.changes.outputs.py_src == 'true' || github.event_name == 'workflow_dispatch' }}
2930
runs-on: ubuntu-latest
30-
name: PyLint
31+
name: Analysis & Coverage
3132
steps:
3233
- uses: actions/checkout@v2
3334

3435
- name: pylint installation
3536
run: |
36-
python -m pip install --upgrade pip
37-
python -m pip install -r requirements.txt
38-
pip install pylint
37+
python3 -m pip install --upgrade pip
38+
python3 -m pip install -r requirements.txt
39+
python3 -m pip install -r requirements_dev.txt
40+
python3 -m pip install install pylint
3941
40-
- name: pylint analysis
41-
run: |
42-
pylint --rcfile .pylintrc pillow_heif/*
42+
- name: Install from source
43+
run: sudo -H pip3 -v install .
44+
env:
45+
GITHUB_BUILD: true
46+
47+
- name: Pylint Analysis
48+
run: pylint --rcfile .pylintrc pillow_heif
49+
50+
- name: Generate coverage report
51+
run: coverage run --rcfile=pyproject.toml -m pytest && coverage xml
52+
53+
- name: Upload report to Codecov
54+
uses: codecov/codecov-action@v2
55+
with:
56+
file: ./coverage.xml
57+
fail_ci_if_error: true
58+
verbose: true
4359

4460
checks_status:
45-
needs: [changes, python-pylint]
61+
needs: [changes, build-analysis]
4662
if: ${{ always() && contains(needs.*.result, 'success') && !(contains(needs.*.result, 'failure')) }}
4763
name: checks-status
4864
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)