Skip to content

Commit 4e76638

Browse files
committed
CI & CD: analysis action #38
1 parent 4aeda28 commit 4e76638

File tree

1 file changed

+59
-4
lines changed

1 file changed

+59
-4
lines changed

.github/workflows/analysis-coverage.yml

Lines changed: 59 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929

3030
- uses: actions/setup-python@v4
3131
with:
32-
python-version: '3.10'
32+
python-version: '3.7'
3333

3434
- name: Prepare system
3535
run: sudo apt -y install libheif-dev
@@ -38,7 +38,7 @@ jobs:
3838
run: python3 -m pip -v install ".[dev]"
3939

4040
- name: Pylint Analysis
41-
run: pylint pillow_heif
41+
run: python3 -m pylint pillow_heif
4242

4343
coverage-linux:
4444
needs: [analysis]
@@ -64,7 +64,10 @@ jobs:
6464
run: python3 -c "import pillow_heif; print(pillow_heif.libheif_info())"
6565

6666
- name: Generate coverage report
67-
run: coverage run -m pytest -s && coverage xml && coverage html
67+
run: |
68+
export PH_FULL_ACTION=1
69+
export EXP_PH_LIBHEIF_VERSION="1.12.0"
70+
coverage run -m pytest -s && coverage xml && coverage html
6871
6972
- name: HTML coverage to artifacts
7073
uses: actions/upload-artifact@v3
@@ -106,7 +109,9 @@ jobs:
106109
run: python3 -c "import pillow_heif; print(pillow_heif.libheif_info())"
107110

108111
- name: Generate coverage report
109-
run: coverage run -m pytest -s && coverage xml && coverage html
112+
run: |
113+
export PH_FULL_ACTION=1
114+
coverage run -m pytest -s && coverage xml && coverage html
110115
111116
- name: HTML coverage to artifacts
112117
uses: actions/upload-artifact@v3
@@ -128,6 +133,7 @@ jobs:
128133
name: Coverage(Windows)
129134
env:
130135
MSYS2_PREFIX: "C:/temp/msys64/mingw64"
136+
PH_FULL_ACTION: 1
131137

132138
steps:
133139
- uses: actions/checkout@v3
@@ -182,3 +188,52 @@ jobs:
182188
file: ./coverage.xml
183189
fail_ci_if_error: true
184190
verbose: true
191+
192+
coverage-pi-heif:
193+
needs: [analysis]
194+
runs-on: macos-12
195+
name: Coverage Light(macOS)
196+
197+
steps:
198+
- uses: actions/checkout@v3
199+
200+
- name: Put pi-heif files
201+
run: cp -r -v ./pi-heif/* .
202+
203+
- uses: actions/setup-python@v4
204+
with:
205+
python-version: '3.9'
206+
207+
- name: Prepare system
208+
run: |
209+
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
210+
brew uninstall --force --ignore-dependencies imagemagick
211+
brew uninstall --force --ignore-dependencies libheif x265 aom
212+
brew install --formula ./libheif/macos/libheif.rb
213+
214+
- name: Install from source
215+
run: |
216+
python3 -m pip install opencv-python coverage
217+
python3 -m pip -v install ".[tests]"
218+
219+
- name: LibHeif info
220+
run: python3 -c "import pillow_heif; print(pillow_heif.libheif_info())"
221+
222+
- name: Generate coverage report
223+
run: |
224+
export PH_LIGHT_ACTION=1
225+
coverage run -m pytest -s && coverage xml && coverage html
226+
227+
- name: HTML coverage to artifacts
228+
uses: actions/upload-artifact@v3
229+
with:
230+
name: coverage_light_macos
231+
path: ./htmlcov
232+
if-no-files-found: error
233+
234+
- name: Upload report to Codecov
235+
uses: codecov/codecov-action@v3
236+
with:
237+
file: ./coverage.xml
238+
fail_ci_if_error: true
239+
verbose: true

0 commit comments

Comments
 (0)