fix: trying some approaches #801
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: Json2xml | |
| on: | |
| push: | |
| branches: [main, master] | |
| paths-ignore: | |
| - 'docs/**' | |
| - '*.md' | |
| - '*.rst' | |
| pull_request: | |
| paths-ignore: | |
| - 'docs/**' | |
| - '*.md' | |
| - '*.rst' | |
| permissions: | |
| contents: read | |
| checks: write # For test results | |
| pull-requests: write # For codecov | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| build: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: [pypy-3.10, pypy-3.11, '3.10', '3.11', '3.12', '3.13'] | |
| tox-python-version: [pypy3.10, pypy3.11, py310, py311, py312, py313] | |
| os: [ | |
| ubuntu-latest, | |
| windows-latest, | |
| macos-latest, | |
| ] | |
| include: | |
| # Add exact version 3.14.0-beta.1 for ubuntu-latest only | |
| - python-version: 3.14.0-beta.1 | |
| tox-python-version: py314-full | |
| os: ubuntu-latest | |
| # Add special linting and type-checking jobs | |
| - python-version: '3.12' | |
| tox-python-version: lint | |
| os: ubuntu-latest | |
| - python-version: '3.12' | |
| tox-python-version: typecheck | |
| os: ubuntu-latest | |
| exclude: | |
| # Exclude other OSes with Python 3.14.0-beta.1 | |
| - python-version: 3.14.0-beta.1 | |
| tox-python-version: py314-full | |
| os: windows-latest | |
| - python-version: 3.14.0-beta.1 | |
| os: macos-latest | |
| tox-python-version: py314-full | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| persist-credentials: false | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v5.2.0 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| allow-prereleases: true | |
| cache: 'pip' | |
| cache-dependency-path: | | |
| requirements*.txt | |
| requirements-dev.in | |
| - name: install uv | |
| uses: astral-sh/setup-uv@v6 | |
| with: | |
| enable-cache: true | |
| cache-dependency-glob: requirements*.txt | |
| - name: Install dependencies | |
| run: | | |
| uv pip install --system tox tox-uv | |
| uv pip install --system pytest pytest-xdist pytest-cov | |
| - name: Run tox targets for ${{ matrix.python-version }} | |
| run: tox -e ${{matrix.tox-python-version}} --parallel auto | |
| env: | |
| PYTHONPATH: ${{ github.workspace }} | |
| - name: Upload coverage to Codecov | |
| uses: codecov/codecov-action@v5 | |
| if: success() && matrix.tox-python-version != 'lint' && matrix.tox-python-version != 'typecheck' | |
| with: | |
| directory: ./coverage/reports/ | |
| env_vars: OS,PYTHON | |
| fail_ci_if_error: true | |
| files: ./coverage.xml | |
| flags: unittests | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| name: codecov-umbrella | |
| verbose: true | |