Merge pull request #751 from Shutgun/crc_error_low_memory #2156
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: Run Tox tests | |
| on: | |
| push: | |
| branches: | |
| - master | |
| - releases/* | |
| pull_request: | |
| types: | |
| - opened | |
| - synchronize | |
| - reopened | |
| jobs: | |
| build: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, windows-latest, ubuntu-24.04-arm, windows-11-arm] | |
| python-version: [ | |
| "3.10", | |
| "3.11", | |
| "3.12", | |
| "3.13", | |
| "3.14", | |
| "3.14t", | |
| "3.15-dev", | |
| "pypy-3.11", | |
| ] | |
| include: | |
| - os: macos-latest | |
| python-version: "pypy-3.11" | |
| - os: macos-latest | |
| python-version: "3.14" | |
| exclude: | |
| - os: windows-11-arm | |
| python-version: 'pypy-3.11' | |
| - os: windows-11-arm | |
| python-version: '3.10' | |
| - os: windows-11-arm | |
| python-version: '3.14' | |
| - os: windows-11-arm | |
| python-version: '3.14t' | |
| - os: windows-11-arm | |
| python-version: '3.15-dev' | |
| name: Test Python ${{ matrix.python-version }} on ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 20 | |
| - name: Setup python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install system library(linux) | |
| if: runner.os == 'linux' | |
| run: | | |
| sudo apt-get update -q -y | |
| sudo apt-get install -q -y libarchive-dev graphviz | |
| - name: Download libarchive(Windows) | |
| if: runner.os == 'Windows' | |
| uses: carlosperate/download-file-action@v2 | |
| with: | |
| file-url: "https://github.com/libarchive/libarchive/releases/download/v3.8.8/libarchive-3.8.8.zip" | |
| file-name: "libarchive-3.8.8.zip" | |
| sha256: "a70e92bca34dde23880c23f922356946ff868e4e7fa1d39b091e02993b8683f0" | |
| - name: Install libarchive(Windows) | |
| if: runner.os == 'Windows' | |
| run: | | |
| $file = "libarchive-3.8.8.zip" | |
| Expand-Archive -LiteralPath $file -DestinationPath $env:GITHUB_WORKSPACE | |
| choco install graphviz | |
| - name: Install dependencies | |
| run: | | |
| pip install -U pip tox wheel setuptools setuptools_scm[toml] | |
| pip install tox-gh-actions coveralls coverage[toml] | |
| - name: Test project with tox | |
| if: runner.os != 'Windows' | |
| run: | | |
| tox | |
| coverage xml -o cobertura.xml | |
| env: | |
| PYTEST_ADDOPTS: "--cov-config=pyproject.toml --cov --cov-append --benchmark-skip" | |
| - name: Test project with tox (windows) | |
| if: runner.os == 'Windows' | |
| run: | | |
| echo LIBARCHIVE="${env:LIBARCHIVE}" | |
| tox | |
| coverage xml -o cobertura.xml | |
| env: | |
| LIBARCHIVE: "${{ github.workspace }}\\libarchive\\bin\\archive.dll" | |
| PYTEST_ADDOPTS: "--cov-config=pyproject.toml --cov --cov-append --benchmark-skip" | |
| - name: Send coverage to coveralls | |
| run: | | |
| coveralls | |
| env: | |
| COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }} | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| COVERALLS_PARALLEL: true | |
| COVERALLS_FLAG_NAME: py-${{ matrix.python-version }}-${{ matrix.os }} | |
| - uses: actions/setup-java@v5 | |
| if: ( runner.os != 'Windows' ) && ( github.event_name == 'push' ) && ( github.ref == 'refs/heads/master' ) | |
| with: | |
| distribution: 'temurin' | |
| java-version: '21' | |
| - name: Send coverage to codacy | |
| if: ( runner.os != 'Windows' ) && ( github.event_name == 'push' ) && ( github.ref == 'refs/heads/master' ) | |
| run: | | |
| java -jar utils/codacy-coverage-reporter.jar report -l Python -t ${PROJECT_TOKEN} --partial -r cobertura.xml | |
| env: | |
| PROJECT_TOKEN: ${{ secrets.CODACY_PROJECT_TOKEN }} | |
| test_slow_tests: | |
| name: Test slow cases | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 20 | |
| - name: Setup python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: '3.14' | |
| architecture: x64 | |
| - name: Install system library(linux) | |
| run: | | |
| sudo apt-get update -q -y | |
| sudo apt-get install -q -y libarchive-dev | |
| - name: Install dependencies | |
| run: | | |
| pip install -U pip setuptools setuptools_scm[toml] | |
| pip install tox tox-gh-actions | |
| - name: Test project with tox | |
| run: tox | |
| env: | |
| PYTEST_ADDOPTS: "--no-cov --run-slow -k extract_high_compression_rate" | |
| finish: | |
| runs-on: ubuntu-latest | |
| name: finish parallel build | |
| needs: build | |
| steps: | |
| - name: Checkout 🛎️ | |
| uses: actions/checkout@v6 | |
| - name: Tell Coveralls that the parallel build is finished | |
| run: | | |
| curl -k \ | |
| https://coveralls.io/webhook?repo_token=$COVERALLS_REPO_TOKEN \ | |
| -d "payload[build_num]=$GITHUB_SHA&payload[status]=done" | |
| env: | |
| COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }} | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - uses: actions/setup-java@v5 | |
| if: ( github.event_name == 'push' ) && ( github.ref == 'refs/heads/master' ) | |
| with: | |
| distribution: 'temurin' | |
| java-version: '21' | |
| - name: Send coverage to codacy | |
| if: ( github.event_name == 'push' ) && ( github.ref == 'refs/heads/master' ) | |
| run: | | |
| java -jar utils/codacy-coverage-reporter.jar final -t ${PROJECT_TOKEN} | |
| env: | |
| PROJECT_TOKEN: ${{ secrets.CODACY_PROJECT_TOKEN }} |