[pre-commit.ci] pre-commit autoupdate #654
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: | |
| pull_request: | |
| push: | |
| branches: [main] | |
| jobs: | |
| build: | |
| name: Test on ${{ matrix.os }} with Python ${{ matrix.python-version }} | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] | |
| os: [ubuntu-latest, windows-latest, macos-latest] | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| allow-prereleases: true | |
| - name: Install pandoc on Linux | |
| if: matrix.os == 'ubuntu-latest' | |
| run: | | |
| sudo apt-get update && sudo apt-get install -y pandoc texlive-latex-base texlive-fonts-recommended texlive-latex-extra | |
| - name: Install gotranx | |
| run: | | |
| python -m pip install -e ".[test]" | |
| - name: Test with pytest | |
| run: | | |
| python -m pytest --cov=gotranx --cov-report html --cov-report xml --cov-report term-missing -v | |
| - name: Coverage report | |
| if: matrix.python-version == '3.10' && matrix.os == 'ubuntu-latest' | |
| run: | | |
| python3 -m coverage report | sed 's/^/ /' >> $GITHUB_STEP_SUMMARY | |
| python3 -m coverage json | |
| export TOTAL=$(python3 -c "import json;print(json.load(open('coverage.json'))['totals']['percent_covered_display'])") | |
| echo "total=$TOTAL" >> $GITHUB_ENV | |
| - name: Upload HTML report. | |
| if: matrix.python-version == '3.10' && matrix.os == 'ubuntu-latest' | |
| uses: actions/upload-artifact@v5 | |
| with: | |
| name: html-report | |
| path: htmlcov |