Skip to content

Misc fixes, add face parsing/segmentation models #68

Misc fixes, add face parsing/segmentation models

Misc fixes, add face parsing/segmentation models #68

Workflow file for this run

name: tests
on:
push:
branches:
- master
jobs:
test-package:
runs-on: ubuntu-20.04
strategy:
matrix:
python-version: ["3.10"]
steps:
- uses: actions/checkout@v3
- name: Setup Medusa
uses: ./.github/actions/setup-medusa
with:
python-version: ${{ matrix.python-version }}
- name: Cache downloaded models
id: cache-downloads
uses: actions/cache@v3
with:
path: ~/.medusa_ext_data
key: ${{ runner.os }}
- name: Download external data
shell: bash
env:
passwd_flame: ${{ secrets.PASSWD_FLAME }}
if: steps.cache-downloads.outputs.cache-hit != 'true'
run: poetry run ./ci/download_data
- name: Test with pytest
shell: bash
run: poetry run ./ci/run_unittests
- name: Run coverage
# https://nedbatchelder.com/blog/202209/making_a_coverage_badge.html
shell: bash
run: |
poetry run ./ci/run_coverage
export TOTAL_TEST=$(python -c "import json;print(json.load(open('coverage.json'))['totals']['percent_covered_display'])")
echo "total_test=$TOTAL_TEST" >> $GITHUB_ENV
echo "### Total test coverage: ${TOTAL_TEST}%" >> $GITHUB_STEP_SUMMARY
- name: Make coverage badge
uses: schneegans/[email protected]
with:
auth: ${{ secrets.MEDUSA_COVERAGE_BADGE_TOKEN }}
gistID: 420039a0fe8fb8c1170e0478cdcd0f26
filename: medusa_coverage_badge.json
label: Coverage
message: ${{ env.total_test }}%
minColorRange: 50
maxColorRange: 90
valColorRange: ${{ env.total_test }}
- name: Run interrogate
shell: bash
run: |
poetry run ./ci/run_interrogate
TOTAL_DOCSTR=$(cat .interrogate_results.txt)
export TOTAL_DOCSTR=${TOTAL_DOCSTR: -6:2}
echo "total_docstr=$TOTAL_DOCSTR" >> $GITHUB_ENV
echo "### Total docstring coverage: ${TOTAL_DOCSTR}%" >> $GITHUB_STEP_SUMMARY
- name: Make interrogate badge
uses: schneegans/[email protected]
with:
auth: ${{ secrets.MEDUSA_INTERROGATE_BADGE_TOKEN }}
gistID: cb6da52c965ec24f136b74a1ebad1964
filename: medusa_interrogate_badge.json
label: Docs
message: ${{ env.total_docstr }}%
minColorRange: 50
maxColorRange: 90
valColorRange: ${{ env.total_docstr }}