Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 64 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: CI

on:
push:
branches:
- main
- master
pull_request:

jobs:
tests:
runs-on: ubuntu-latest
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
strategy:
fail-fast: false
matrix:
python-version:
- "3.8"
- "3.9"
- "3.10"
- "3.11"
- "3.12"
- "3.13"
- "3.14"
- "pypy-3.9"
steps:
- name: Check out repository
uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y zip p7zip-full

- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
pip install . pytest pytest-cov

- name: Run tests
run: pytest -vv --cov=jsonstore --cov-report=xml --junitxml=test-results.xml

- name: Upload coverage to Codecov
if: always() && env.CODECOV_TOKEN != ''
uses: codecov/codecov-action@v5
with:
token: ${{ env.CODECOV_TOKEN }}
files: ./coverage.xml
fail_ci_if_error: true

- name: Upload test results to Codecov
if: always() && env.CODECOV_TOKEN != ''
uses: codecov/codecov-action@v5
with:
token: ${{ env.CODECOV_TOKEN }}
files: ./test-results.xml
report_type: test_results
fail_ci_if_error: true
3 changes: 1 addition & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ jobs:
run: |
python -m pip install --upgrade pip build
python -m build
# the publishing uses PyPI's trusted publishing, so configured on pypi instead of using secrets
# the publishing uses PyPI's trusted publishing, so configured on pypi instead of using secrets
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
34 changes: 0 additions & 34 deletions .github/workflows/test.yml

This file was deleted.