-
Notifications
You must be signed in to change notification settings - Fork 179
Add testing workflow #260
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Add testing workflow #260
Changes from all commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
d091052
add testing workflow
aktech 867f1a5
single python
aktech 3bac60c
trigger
aktech 87d8bfe
install in build job
aktech 0d8c14b
install pytest
aktech 619e800
install test dependencies
aktech dfa6ea2
add xfail to tests
aktech bb45d3f
add reusable workflows and add pr number in xfail
aktech d0a177a
fix composite action
aktech eae0818
add more xfails
aktech 1e4d94c
xfail top_k_uniques_stats_generator_test.py
aktech 1f1c584
xfails in partitioned_stats_generator_test.py
aktech 53beec9
more xfails
aktech d39ccbd
add missing imports
aktech 57c1e5b
fix extra decorators
aktech da5b290
more xfails
aktech 703684a
Merge branch 'master' into testing-workflow
aktech ec7c05b
use xfail instead of skip
aktech 94c6af2
remove xfails that are passing
aktech ec0e02a
dont run xfail + add test deps
aktech File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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 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
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/download-artifact@v4.1.8 | ||
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 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
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 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
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.