Modify the code not to use a feature unavailable in Python 3.11 #4
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: Tests of codes | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - develop | |
| pull_request: | |
| branches: | |
| - main | |
| - develop | |
| jobs: | |
| test: | |
| name: Test | |
| strategy: | |
| matrix: | |
| os: | |
| - ubuntu-24.04 | |
| - ubuntu-24.04-arm | |
| - macos-15 | |
| - macos-15-intel | |
| - windows-2025 | |
| python-version: | |
| - '3.11' | |
| - '3.12' | |
| - '3.13' | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| with: | |
| submodules: recursive | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| python -m pip install flake8 mypy pytest | |
| python -m pip install softfloatpy | |
| - name: Check coding style with flake8 | |
| run: | | |
| python -m flake8 --doctests ./python | |
| - name: Check data types with mypy | |
| run: | | |
| python -m mypy --strict ./python | |
| - name: Test code with pytest | |
| run: | | |
| python -m pytest ./python/tests --doctest-modules |