Skip to content

Improve error handling when downloading highlight images #29

Improve error handling when downloading highlight images

Improve error handling when downloading highlight images #29

Workflow file for this run

# Simple workflow for deploying static content to GitHub Pages
name: Deploy static content to Pages
on:
# Runs on pushes targeting the default branch
push:
branches: ["main"]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
build:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8 pytest pytest-cov pytest-html genbadge[tests,coverage]
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test with pytest
run: |
pytest --cov=./ --cov-report xml:reports/coverage/coverage.xml --cov-report html:reports/coverage --junitxml=reports/junit/junit.xml --html=reports/junit/report.html test
- name: Gen badges
if: always()
run: |
genbadge coverage -o reports/coverage/coverage.svg
genbadge tests -o reports/junit/junit.svg
- name: Setup Pages
if: always()
uses: actions/configure-pages@v5
- name: Upload artifact
if: always()
uses: actions/upload-pages-artifact@v3
with:
path: '${{ github.workspace }}/reports'
- name: Deploy to GitHub Pages
if: always()
id: deployment
uses: actions/deploy-pages@v4