v0.3.2 - Adapt ME #1778
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: ALP dataflow-gen unit tests | |
on: | |
pull_request: | |
types: [opened, ready_for_review, reopened, synchronize] | |
push: | |
branches: | |
- develop | |
workflow_dispatch: | |
env: | |
BRANCH_NAME: ${{ github.head_ref || github.ref_name }} | |
jobs: | |
test-alp-dataflow-gen: | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Install dependencies | |
# protobuf-compiler required for python build dask-sql | |
run: sudo apt-get install protobuf-compiler | |
- uses: actions/checkout@v4 | |
- uses: dorny/[email protected] | |
id: check_file_changed | |
with: | |
filters: | | |
alp_dataflow_gen_changed: | |
- 'services/alp-dataflow-gen/**' | |
- name: Setup python if files have changed | |
uses: actions/setup-python@v2 | |
if: env.BRANCH_NAME == 'develop' || steps.check_file_changed.outputs.alp_dataflow_gen_changed == 'True' | |
with: | |
python-version: 3.11.7 | |
cache: 'pip' | |
- name: Install pip packages if files have changed | |
if: env.BRANCH_NAME == 'develop' || steps.check_file_changed.outputs.alp_dataflow_gen_changed == 'True' | |
working-directory: ./services/alp-dataflow-gen | |
run: pip install -r requirements-dev.txt | |
- name: Run unit tests if files have changed | |
if: env.BRANCH_NAME == 'develop' || steps.check_file_changed.outputs.alp_dataflow_gen_changed == 'True' | |
working-directory: ./services/alp-dataflow-gen/pysrc | |
run: python3 -m pytest -v --disable-pytest-warnings |