Unify PyPI releases via GitHub OIDC (#410) #1011
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 | |
on: | |
push: | |
branches: [ '*' ] | |
pull_request: | |
branches: [ 'master' ] | |
jobs: | |
black-linting: | |
runs-on: ubuntu-latest | |
name: Black Lint | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: psf/black@stable | |
with: | |
options: "--check --verbose" | |
src: "./python" | |
version: "23.3.0" | |
flake8-lint: | |
runs-on: ubuntu-latest | |
name: Flake8 Lint | |
steps: | |
- name: Check out source repository | |
uses: actions/checkout@v2 | |
- name: Set up Python environment | |
uses: actions/setup-python@v2 | |
with: | |
python-version: "3.9" | |
- name: flake8 Lint | |
uses: py-actions/flake8@v2 | |
with: | |
args: "--config python/.flake8" | |
path: "./python" | |
type-checks: | |
runs-on: ubuntu-latest | |
name: Type Checks | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-python@v2 | |
with: | |
python-version: "3.9" | |
- name: Type check | |
working-directory: ./python | |
run: | | |
pip install tox | |
tox -e type-check | |
test: | |
name: Build and Test Module | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
env: | |
OS: ${{ matrix.os }} | |
PYTHON: '3.9' | |
steps: | |
- uses: actions/checkout@master | |
- name: Setup Python | |
uses: actions/setup-python@master | |
with: | |
python-version: 3.9 | |
- name: Set Spark env | |
run: | | |
export SPARK_LOCAL_IP=127.0.0.1 | |
export SPARK_SUBMIT_OPTS="--illegal-access=permit -Dio.netty.tryReflectionSetAccessible=true" | |
- name: Generate coverage report | |
working-directory: ./python | |
run: | | |
python -I -m pip install 'coverage<8,>=7' pyspark==3.2.1 -r requirements.txt | |
coverage run -m unittest discover -s tests -p '*_tests.py' | |
coverage combine | |
coverage xml | |
- name: Publish test coverage | |
uses: codecov/codecov-action@v3 | |
with: | |
fail_ci_if_error: true | |
files: ./python/coverage.xml |