Test #2117
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: "Test" | |
| on: | |
| push: | |
| branches: ["master", "dev", "dev2", "github-action"] | |
| pull_request: | |
| schedule: | |
| - cron: "33 1 * * 3" | |
| workflow_dispatch: | |
| jobs: | |
| ubuntu: | |
| name: Test on Ubuntu | |
| permissions: | |
| contents: read | |
| pull-requests: write | |
| issues: write | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: | |
| - 3.12 | |
| - 3.13 | |
| - 3.14 | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: List files | |
| run: ls -l | |
| - name: Install dependencies | |
| run: | | |
| sudo apt-get install dictzip --yes | |
| sh ./scripts/test-deps.sh | |
| - name: Run tests | |
| run: bash scripts/ci/test.sh | |
| - name: Collect coverage reports | |
| if: always() && matrix.python-version == '3.12' | |
| run: bash scripts/ci/collect-coverage.sh | |
| - name: Compare coverage on PR | |
| id: coverage | |
| if: >- | |
| always() && | |
| github.event_name == 'pull_request' && | |
| matrix.python-version == '3.12' | |
| env: | |
| BASE_REF: ${{ github.event.pull_request.base.ref }} | |
| run: python3 scripts/ci/coverage-pr-comment.py | |
| # - name: Post coverage PR comment | |
| # if: >- | |
| # always() && | |
| # github.event_name == 'pull_request' && | |
| # matrix.python-version == '3.12' && | |
| # steps.coverage.outputs.coverage_comment_ready == 'true' | |
| # uses: peter-evans/create-or-update-comment@v4 | |
| # with: | |
| # issue-number: ${{ github.event.pull_request.number }} | |
| # body-path: artifacts/coverage/pr-comment.md | |
| - name: Upload test artifacts | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: pyglossary-test-ubuntu-py${{ matrix.python-version }} | |
| path: artifacts |