Unify PyPI releases with GitHub OIDC #38
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: | |
pull_request: | |
types: [opened, synchronize] | |
push: | |
branches: [master] | |
jobs: | |
tests: | |
env: | |
PYTHON: '3.9' | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Unshallow | |
run: git fetch --prune --unshallow | |
- 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: ./ | |
run: | | |
pip install -r requirements.txt | |
pip install coverage | |
coverage run -m unittest discover -s tests -p 'tests_*.py' | |
coverage xml | |
- name: Publish test coverage | |
uses: codecov/codecov-action@v1 |