Skipped int array list sort benchmark #56
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: Python package | |
| on: | |
| push: | |
| branches: [ "master" ] | |
| pull_request: | |
| branches: [ "master" ] | |
| jobs: | |
| lint: | |
| name: Lint Code | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python 3.12 | |
| uses: actions/setup-python@v3 | |
| with: | |
| python-version: "3.12" | |
| - name: Install flake8 | |
| run: | | |
| python -m pip install --upgrade pip | |
| python -m pip install flake8 | |
| - name: Lint with flake8 | |
| run: | | |
| flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics | |
| flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics | |
| build: | |
| name: Build | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ ubuntu-latest, windows-latest, macos-latest ] | |
| python-version: [ "3.9", "3.10", "3.11", "3.12", "3.13" ] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v3 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Cache pip | |
| uses: actions/cache@v3 | |
| with: | |
| path: ~/.cache/pip | |
| key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt') }} | |
| restore-keys: | | |
| ${{ runner.os }}-pip- | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| python -m pip install flake8 pytest pytest-cov | |
| python -m pip install -r requirements.txt | |
| - name: Build | |
| shell: bash | |
| run: | | |
| if [[ "$RUNNER_OS" == "Windows" ]]; then | |
| ./build.cmd | |
| else | |
| chmod +x ./build.sh && ./build.sh | |
| fi | |
| - name: Find Correct Build | |
| id: findbuild | |
| shell: bash | |
| run: | | |
| if [[ "$RUNNER_OS" == "Windows" ]]; then | |
| output=__pyfastutil.pyd | |
| else | |
| output=__pyfastutil.so | |
| fi | |
| extension="${output##*.}" | |
| echo "::set-output name=libname::$output" | |
| echo "::set-output name=extension::$extension" | |
| # 上传构建工件,并在文件名中添加操作系统和 Python 版本后缀 | |
| - name: Upload Build Artifacts | |
| uses: actions/upload-artifact@v3 | |
| with: | |
| name: "__pyfastutil-${{ matrix.os }}-py${{ matrix.python-version }}.${{ steps.findbuild.outputs.extension }}" | |
| path: pyfastutil/${{ steps.findbuild.outputs.libname }}" | |
| - name: Test with pytest and generate coverage report | |
| run: | | |
| pytest --cov=your_package_name --cov-report=xml | |
| - name: Upload coverage to Codecov | |
| uses: codecov/codecov-action@v3 | |
| with: | |
| file: ./coverage.xml | |
| flags: unittests | |
| name: codecov-umbrella |