fix(master): Replace CC-BY-2.0 with CC-BY-4.0 #191
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: Run tests | |
on: | |
push: | |
pull_request: | |
types: [opened, reopened] | |
jobs: | |
list_test_subjects: | |
runs-on: ubuntu-latest | |
outputs: | |
matrix: ${{ steps.set-matrix.outputs.matrix }} | |
steps: | |
- uses: actions/checkout@v2 | |
- id: set-matrix | |
run: echo "::set-output name=matrix::$(find . -type f -name 'Dockerfile' | awk -F\/ '{print $3"/"$4}' | jq -Rsc '. / "\n" - [""]')" | |
test: | |
name: ${{ matrix.subject }} | |
runs-on: ubuntu-latest | |
needs: list_test_subjects | |
strategy: | |
matrix: | |
subject: ${{fromJSON(needs.list_test_subjects.outputs.matrix)}} | |
steps: | |
- uses: satackey/action-docker-layer-caching@v0.0.11 | |
continue-on-error: true | |
with: | |
key: thumbor-plugins-test-${{ matrix.subject }}-{hash} | |
restore-keys: | | |
thumbor-plugins-test-${{ matrix.subject }}- | |
thumbor-plugins-test- | |
- uses: actions/checkout@v2 | |
- id: build-test-image | |
run: docker build -t test_image -f thumbor_plugins/${{ matrix.subject }}/tests/docker/Dockerfile . | |
- id: run-tests | |
run: | | |
MODULE_PATH=${{ matrix.subject }} | |
MODULE="thumbor_plugins.${MODULE_PATH////.}" | |
docker run --rm -v$(pwd):/app test_image /bin/bash -c "pip install -r test_requirements.txt && pip install -e thumbor_plugins/${{ matrix.subject }} && pytest --cov=$MODULE thumbor_plugins/${{ matrix.subject }}/tests && coverage lcov" | |
- name: Coveralls | |
uses: coverallsapp/github-action@1.1.3 | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
path-to-lcov: coverage.lcov | |
flag-name: run-${{ matrix.subject }} | |
parallel: true | |
finish: | |
needs: test | |
runs-on: ubuntu-latest | |
steps: | |
- name: Coveralls Finished | |
uses: coverallsapp/github-action@1.1.3 | |
with: | |
github-token: ${{ secrets.github_token }} | |
parallel-finished: true |