fix: compatibility with thumbor.filters.fill #69
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: Test | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
jobs: | |
build: | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"] | |
python-bin: ["python3"] | |
thumbor-version: ["7"] | |
include: | |
- python-version: "2.7" | |
python-version-desc: "" | |
python-bin: "python2" | |
thumbor-version: "6" | |
- python-version: "3.7" | |
python-version-desc: " (python 3.7)" | |
- python-version: "3.8" | |
python-version-desc: " (python 3.8)" | |
- python-version: "3.9" | |
python-version-desc: " (python 3.9)" | |
- python-version: "3.10" | |
python-version-desc: " (python 3.10)" | |
- python-version: "3.11" | |
python-version-desc: " (python 3.11)" | |
runs-on: ubuntu-latest | |
name: Thumbor ${{ matrix.thumbor-version }}${{ matrix.python-version-desc }} | |
env: | |
FFMPEG_BUILD_VER: 20210119-553eb07737 | |
GIFSICLE_VER: 1.92 | |
PYTEST_ADDOPTS: ${{ matrix.python-version == '2.7' && '--ignore=tests/result_storages/test_thumbor_aws_storage.py' || '' }} | |
container: | |
image: ${{ matrix.python-version == '2.7' && 'python:2.7-buster' || null }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python ${{ matrix.python-version }} | |
if: matrix.python-version != '2.7' | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install python 2.7 container- specific dependencies | |
if: matrix.python-version == '2.7' | |
run: | | |
apt-get update | |
apt-get install -y sudo | |
- name: Install ffmpeg | |
run: | | |
curl -sLo - \ | |
https://github.com/theatlantic/ffmpeg-build-script/releases/download/ffmpeg-${{ env.FFMPEG_BUILD_VER }}/ffmpeg-linux-${{ env.FFMPEG_BUILD_VER }}.tar.gz | \ | |
sudo tar -C /usr/bin -zxf - | |
- name: Install gifsicle | |
run: | | |
curl -sLo - http://www.lcdf.org/gifsicle/gifsicle-1.92.tar.gz | \ | |
tar Czxf . - | |
cd gifsicle-${{ env.GIFSICLE_VER }} | |
./configure --prefix=/usr | |
sudo make install | |
rm -rf gifsicle-${{ env.GIFSICLE_VER }} | |
- name: Install system dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y libcurl4-openssl-dev | |
- name: Install tox | |
run: | | |
${{ matrix.python-bin }} -m pip install --upgrade pip | |
${{ matrix.python-bin }} -m pip install tox tox-gh-actions wheel | |
- name: Run tests | |
run: | | |
tox -- -v | |
- name: Upload junit xml | |
if: always() | |
uses: actions/upload-artifact@v3 | |
with: | |
name: junit-reports | |
path: reports/*.xml | |
- name: Combine coverage | |
if: matrix.python-version != '2.7' | |
run: tox -e coverage-report | |
- name: Upload coverage | |
uses: codecov/codecov-action@v3 | |
if: matrix.python-version != '2.7' | |
with: | |
file: ./coverage.xml | |
name: ${{ github.workflow }} | |
token: ${{ secrets.CODECOV_TOKEN }} | |
report: | |
if: always() | |
needs: build | |
runs-on: ubuntu-latest | |
name: "Report Test Results" | |
steps: | |
- uses: actions/download-artifact@v3 | |
with: | |
name: junit-reports | |
- name: Publish Unit Test Results | |
uses: EnricoMi/publish-unit-test-result-action@v2 | |
if: always() | |
with: | |
files: ./*.xml | |
report_individual_runs: true | |
check_name: "Unit Test Results" | |
success: | |
needs: build | |
runs-on: ubuntu-latest | |
name: Test Successful | |
steps: | |
- name: Success | |
run: echo Test Successful |