Merge pull request #13 from Code0x58/codex/add-pypi-badge-to-readme #11
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - master | |
| pull_request: | |
| jobs: | |
| tests: | |
| runs-on: ${{ matrix.os }} | |
| env: | |
| CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: | |
| - ubuntu-latest | |
| - windows-latest | |
| python-version: | |
| - "3.8" | |
| - "3.9" | |
| - "3.10" | |
| - "3.11" | |
| - "3.12" | |
| - "3.13" | |
| - "3.14" | |
| - "pypy-3.9" | |
| exclude: | |
| - os: windows-latest | |
| python-version: "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 | |
| if: runner.os == 'Linux' | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y zip p7zip-full | |
| - name: Install Python dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| python -m 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 |