Skip to content

Commit

Permalink
Create a github action to test the package.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 622982889
  • Loading branch information
zcharles8 authored and copybara-github committed Apr 8, 2024
1 parent e019a6d commit ad347dd
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/test_package.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Test python package

# Allow to trigger the workflow manually (e.g. when deps changes)
on: [push, workflow_dispatch]

jobs:
pytest-job:
runs-on: ubuntu-latest
timeout-minutes: 20

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

steps:
- uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.10"

- name: Build the python package
run: |
pip install --upgrade pip
pip --version
pip install --upgrade build
python -m build
- name: Test the python package
run: |
pip install --upgrade "build/"*".whl"
pip freeze
python -c "import dataset_grouper as dsgp; print(dsgp.PartitionedDataset)"
python -c "import dataset_grouper; print(dataset_grouper.__version__)"

0 comments on commit ad347dd

Please sign in to comment.