Fix flake #168
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
| # This workflow is a re-implementation of the workflow for Travis CI: Tests dpytest. | |
| # Runs every push on any branch and on a PR targeting "master" | |
| name: Test CI | |
| on: | |
| push: | |
| paths-ignore: [ "docs/*", "*.md", ".readthedocs.yml", ".github/dependabot.yml", ".vscode" ] | |
| pull_request: | |
| paths-ignore: [ "docs/*", "*.md", ".readthedocs.yml", ".github/dependabot.yml", ".vscode" ] | |
| branches: [ "master" ] | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| # don't cancel any remaining jobs when one fails | |
| fail-fast: false | |
| # how you define a matrix strategy | |
| matrix: | |
| # use these pythons | |
| python-version: [ "3.11", "3.12", "3.13", "3.14" ] | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| cache: 'pip' | |
| cache-dependency-path: | | |
| dev-requirements.txt | |
| setup.py | |
| - name: Install dev dependencies | |
| run: python -m pip install -r dev-requirements.txt | |
| - name: Install self (dpytest) | |
| run: python -m pip install . | |
| #- name: Test with pytest | |
| # run: python -m pytest | |
| - name: Test with pytest and coverage | |
| run: coverage run --source=discord/ext/test -m pytest | |
| - name: Report coverage | |
| run: | | |
| coverage report | |
| coverage html | |
| coverage xml | |
| coverage lcov | |
| - name: Upload HTML report | |
| uses: actions/upload-artifact@v5 | |
| with: | |
| name: ${{ matrix.python-version }}-cov-htmlcov | |
| path: htmlcov | |
| if-no-files-found: warn | |
| - name: Upload XML report | |
| uses: actions/upload-artifact@v5 | |
| with: | |
| name: ${{ matrix.python-version }}-cov-xml | |
| path: coverage.xml | |
| if-no-files-found: warn | |
| - name: Upload LCOV report | |
| uses: actions/upload-artifact@v5 | |
| with: | |
| name: ${{ matrix.python-version }}-cov-lcov | |
| path: coverage.lcov | |
| if-no-files-found: warn | |
| mypy: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| # don't cancel any remaining jobs when one fails | |
| fail-fast: false | |
| # how you define a matrix strategy | |
| matrix: | |
| # use these pythons | |
| python-version: [ "3.11", "3.14" ] | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| cache: 'pip' | |
| cache-dependency-path: | | |
| dev-requirements.txt | |
| setup.py | |
| - name: Install dev dependencies | |
| run: python -m pip install -r dev-requirements.txt | |
| - name: Install self (dpytest) | |
| run: python -m pip install . | |
| - name: Run mypy | |
| run: mypy --install-types --non-interactive | |