Merge remote-tracking branch 'origin/gh-pages' #2626
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: build | |
| on: | |
| push: | |
| branches: | |
| - "main" | |
| pull_request: | |
| branches: | |
| - "release/*" | |
| - "patch/*" | |
| - "main" | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: [ "3.9","3.10", "3.11" ] | |
| steps: | |
| - name: Free up disk space at start | |
| run: | | |
| sudo apt clean | |
| sudo rm -rf /usr/share/dotnet /usr/local/lib/android /opt/ghc | |
| sudo rm -rf "/usr/local/share/boost" | |
| sudo rm -rf "$AGENT_TOOLSDIRECTORY" | |
| df -h | |
| - uses: actions/checkout@v3 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| id: setup-python | |
| uses: actions/setup-python@v3 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - uses: snok/install-poetry@v1 | |
| with: | |
| version: 2.1.3 | |
| virtualenvs-create: true | |
| virtualenvs-in-project: true | |
| installer-parallel: true | |
| - name: Load cached venv | |
| id: cached-poetry-dependencies | |
| uses: actions/cache@v3 | |
| with: | |
| path: .venv | |
| key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }} | |
| - name: Install dependencies | |
| if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' | |
| run: | | |
| poetry cache clear pypi --all -n > /dev/null | |
| poetry install --with dev --all-extras --no-cache --quiet --no-interaction | |
| source ./.venv/bin/activate && pip uninstall -y pyspark && rm -rf ./.venv/lib/python${{ matrix.python-version }}/site-packages/pyspark*/ | |
| pip install pyspark==3.5.6 | |
| - name: Check linting | |
| run: | | |
| poetry run task lint | |
| - name: Check formatting | |
| run: | | |
| poetry run task is-formatted | |
| - name: Test with pytest | |
| run: | | |
| poetry run task force-cpu-torch | |
| poetry run task extra-lib | |
| poetry run task test |