-
Notifications
You must be signed in to change notification settings - Fork 174
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add testing workflow * single python * trigger * install in build job * install pytest * install test dependencies * add xfail to tests * add reusable workflows and add pr number in xfail * fix composite action * add more xfails * xfail top_k_uniques_stats_generator_test.py * xfails in partitioned_stats_generator_test.py * more xfails * add missing imports * fix extra decorators * more xfails * use xfail instead of skip * remove xfails that are passing * dont run xfail + add test deps
- Loading branch information
Showing
21 changed files
with
304 additions
and
6 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
name: Resusable steps to build data-validation | ||
|
||
inputs: | ||
python-version: | ||
description: 'Python version' | ||
required: true | ||
upload-artifact: | ||
description: 'Should upload build artifact or not' | ||
default: false | ||
|
||
runs: | ||
using: 'composite' | ||
steps: | ||
- name: Set up Python ${{ inputs.python-version }} | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ inputs.python-version }} | ||
|
||
- name: Build the package for Python ${{ inputs.python-version }} | ||
shell: bash | ||
run: | | ||
version="${{ matrix.python-version }}" | ||
docker compose run -e PYTHON_VERSION=$(echo "$version" | sed 's/\.//') manylinux2010 | ||
- name: Upload wheel artifact for Python ${{ matrix.python-version }} | ||
if: ${{ inputs.upload-artifact == 'true' }} | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: data-validation-wheel-py${{ matrix.python-version }} | ||
path: dist/*.whl | ||
|
||
- name: Install built wheel | ||
shell: bash | ||
run: | | ||
pip install twine | ||
twine check dist/* | ||
pip install dist/*.whl |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
name: Build | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
branches: | ||
- master | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: ["3.9", "3.10", "3.11"] | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Build data-validation | ||
id: build-data-validation | ||
uses: ./.github/reusable-build | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
upload-artifact: true | ||
|
||
upload_to_pypi: | ||
name: Upload to PyPI | ||
runs-on: ubuntu-latest | ||
if: (github.event_name == 'release' && startsWith(github.ref, 'refs/tags')) || (github.event_name == 'workflow_dispatch') | ||
needs: [build] | ||
environment: | ||
name: pypi | ||
url: https://pypi.org/p/tensorflow-data-validation/ | ||
permissions: | ||
id-token: write | ||
steps: | ||
- name: Retrieve wheels | ||
uses: actions/[email protected] | ||
with: | ||
merge-multiple: true | ||
path: wheels | ||
|
||
- name: List the build artifacts | ||
run: | | ||
ls -lAs wheels/ | ||
- name: Upload to PyPI | ||
uses: pypa/gh-action-pypi-publish@release/v1.9 | ||
with: | ||
packages_dir: wheels/ |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
name: Test | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
branches: | ||
- master | ||
workflow_dispatch: | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: ["3.9", "3.10", "3.11"] | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Build data-validation | ||
id: build-data-validation | ||
uses: ./.github/reusable-build | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Install test dependencies | ||
run: | | ||
pip install pytest scikit-learn scipy | ||
- name: Run Test | ||
run: | | ||
rm -rf bazel-* | ||
# run tests | ||
pytest -vv |
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
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
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
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
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
Oops, something went wrong.