Skip to content

Bumped pillow to 9.3.0 and ver to 0.0.9 #24

Bumped pillow to 9.3.0 and ver to 0.0.9

Bumped pillow to 9.3.0 and ver to 0.0.9 #24

name: "Build - Test - Publish"
on: [push]
env:
PYTHON_VERSION: "3.9"
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ env.PYTHON_VERSION }}
uses: actions/setup-python@v4
with:
python-version: ${{ env.PYTHON_VERSION }}
cache: 'pipenv'
- name: Install pipenv
run: curl https://raw.githubusercontent.com/pypa/pipenv/master/get-pipenv.py | python
- name: Install dependencies
run: pipenv install --deploy --dev
- name: Test with pytest
run: pipenv run pytest --doctest-modules --junitxml=junit/test-results.xml --cov=com --cov-report=xml --cov-report=html
- name: Cache Test Report
uses: actions/cache/save@v3
if: always() # always run even if the previous step fails
with:
path: '/home/runner/work/sci-annot-eval/sci-annot-eval/junit/test-results.xml'
key: junit-results-cache.${{github.sha}}
- name: Build dist
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
run: pipenv run python setup.py bdist && pipenv run python setup.py bdist_wheel
- name: Cache dist files
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
uses: actions/cache/save@v3
with:
path: ./dist
key: dist-cache-${{github.sha}}
test_report:
permissions:
checks: write
runs-on: ubuntu-latest
needs: build
steps:
- name: Fetch Test Report
uses: actions/cache/restore@v3
if: always() # always run even if the previous step fails
with:
path: '/home/runner/work/sci-annot-eval/sci-annot-eval/junit/test-results.xml'
key: junit-results-cache.${{github.sha}}
- name: Publish Test Report
uses: mikepenz/action-junit-report@v3
with:
commit: ${{github.event.workflow_run.head_sha}}
report_paths: '/home/runner/work/sci-annot-eval/sci-annot-eval/junit/test-results.xml'
pypi-publish:
name: Upload release to PyPI
runs-on: ubuntu-latest
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
environment:
name: pypi
url: https://pypi.org/p/sci-annot-eval
permissions:
id-token: write
needs: build
steps:
- name: Fetch dist files
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
uses: actions/cache/restore@v3
with:
path: ./dist
key: dist-cache-${{github.sha}}
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1