Skip to content

CI: try fix path to svg #10

CI: try fix path to svg

CI: try fix path to svg #10

Workflow file for this run

name: CI
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.10.12'
- name: Install dependencies
run: |
pip install -r requirements.txt

Check failure on line 27 in .github/workflows/ci.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/ci.yml

Invalid workflow file

You have an error in your yaml syntax on line 27
- name: Run tests with coverage
run: |
coverage run -m pytest
coverage xml
coverage-badge -o coverage.svg
- uses: actions/upload-artifact@v4
with:
name: coverage-image
path: coverage.svg
- name: Setup Git for Pages
run: |
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git config --global user.name "github-actions[bot]"
- name: Checkout gh-pages branch
- uses: actions/download-artifact@v4
with:
name: coverage-image
run: |
git fetch origin
git checkout gh-pages || git checkout --orphan gh-pages
ls -a
cp coverage.svg .
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Push to gh-pages branch
run: |
git add coverage.svg
git commit -m "Update coverage badge"
git push origin gh-pages
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}