diff --git a/.github/workflows/test_package.yml b/.github/workflows/test_package.yml new file mode 100644 index 0000000..10492db --- /dev/null +++ b/.github/workflows/test_package.yml @@ -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__)"