ci: temporarily disable "safety checks" because it went nuclear on pip. #446
Workflow file for this run
This file contains 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 and Validate | |
on: | |
push: | |
concurrency: | |
group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}' | |
cancel-in-progress: true | |
env: | |
PROJECT_NAME: spark_frame | |
POETRY_VERSION: "1.2.2" | |
jobs: | |
Build-and-Validate: | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] | |
os: [windows-latest, ubuntu-latest, macos-latest] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install poetry | |
uses: abatilo/actions-poetry@v2.0.0 | |
with: | |
poetry-version: ${{ env.POETRY_VERSION }} | |
- name: Upgrade pip | |
run: poetry run python3 -m pip install --upgrade pip>=24.0 | |
- name: Poetry lock | |
run: poetry lock | |
- name: Set up poetry cache | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
cache: 'poetry' | |
- name: Install project | |
run: poetry install | |
- name: Linter ruff (replaces black, isort, flake8 and safety) | |
run: poetry run ruff check . | |
- name: Linter mypy | |
run: poetry run mypy ${{ env.PROJECT_NAME }} | |
- name: Security safety | |
run: poetry run safety check | |
# We run safety but ignore the warning because it always raises a disputed CVE-2018-20225 | |
# that basically says "don't use pip". Until we find a solution to this the result of the check is ignored. | |
continue-on-error: true | |
- name: Build docs | |
run: poetry run mkdocs build | |
- name: Update PATH on Windows | |
run: echo ".github/workflows/resources/hadoop/bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append | |
if: matrix.os == 'windows-latest' | |
# PySpark 3.5 seems broken when using Python 3.12 on Windows | |
- name: Run Unit Tests | |
env: | |
HADOOP_HOME: .github/workflows/resources/hadoop | |
run: poetry run pytest --cov --cov-report=xml | |
if: ${{ !(matrix.os == 'windows-latest' && matrix.python-version == '3.12') }} | |
- name: SonarCloud Scan | |
uses: SonarSource/sonarcloud-github-action@master | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any | |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.10' | |
# PySpark 3.3 is not compatible with Python >= 3.11 | |
- name: Run Tests against spark 33 | |
run: poetry run tox run -e spark33 | |
if: matrix.os == 'ubuntu-latest' && (matrix.python-version == '3.8' || matrix.python-version == '3.9' || matrix.python-version == '3.10') | |
# PySpark 3.4 is not compatible with Python >= 3.12 | |
- name: Run Tests against spark 34 | |
run: poetry run tox run -e spark34 | |
if: matrix.os == 'ubuntu-latest' && (matrix.python-version == '3.8' || matrix.python-version == '3.9' || matrix.python-version == '3.10' || matrix.python-version == '3.11') |