Skip to content

Add test suite

Add test suite #1

Workflow file for this run

name: Tests
on: [push, pull_request]
# Running workflow manually

Check failure on line 4 in .github/workflows/test.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/test.yml

Invalid workflow file

You have an error in your yaml syntax on line 4
workflow_dispatch:
jobs:
test:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.11
uses: actions/setup-python@v4
with:
python-version: "3.11"
cache: 'pip'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e .
pip install pytest pytest-mock pytest-cov ipython
- name: Run tests with coverage
run: |
pytest --cov=jumper_extension --cov-report=xml tests/
- name: Generate coverage badge
uses: tj-actions/coverage-badge-py@v2
with:
output: coverage.svg
- name: Commit coverage badge
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git add coverage.svg
git diff --staged --quiet || git commit -m "Update coverage badge"
git push