diff --git a/.github/workflows/beam-tests.yml b/.github/workflows/beam-tests.yml new file mode 100644 index 00000000..463196b2 --- /dev/null +++ b/.github/workflows/beam-tests.yml @@ -0,0 +1,45 @@ +name: Apache Beam tests + +on: + push: + branches: + - "main" + pull_request: + workflow_dispatch: + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + test: + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: ["ubuntu-latest"] + python-version: ["3.9"] + + steps: + - name: Checkout source + uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - name: Set up Python + uses: actions/setup-python@v3 + with: + python-version: ${{ matrix.python-version }} + architecture: x64 + + - name: Setup Graphviz + uses: ts-graphviz/setup-graphviz@v2 + + - name: Install + run: | + python -m pip install --upgrade pip + python -m pip install -e '.[test-beam]' + + - name: Run tests + run: | + pytest -vs diff --git a/.github/workflows/mypy.yml b/.github/workflows/mypy.yml index cce977e1..e1fac0aa 100644 --- a/.github/workflows/mypy.yml +++ b/.github/workflows/mypy.yml @@ -18,7 +18,7 @@ jobs: fail-fast: false matrix: os: ["ubuntu-latest"] - python-version: ["3.11"] + python-version: ["3.12"] steps: - name: Checkout source diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 33e15aad..b871510e 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -21,7 +21,7 @@ jobs: python-version: ["3.9"] include: - os: "ubuntu-latest" - python-version: "3.11" + python-version: "3.12" steps: - name: Checkout source @@ -50,4 +50,9 @@ jobs: - name: Run tests run: | - pytest -v --cov=cubed --cov-report=term-missing --cov-fail-under=90 + if [ "$RUNNER_OS" == "Windows" ]; then + pytest -v + else + pytest -v --cov=cubed --cov-report=term-missing --cov-fail-under=90 + fi + shell: bash diff --git a/pyproject.toml b/pyproject.toml index 591ffe49..2e684665 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -66,7 +66,6 @@ coiled = [ "s3fs", ] test = [ - "apache-beam", # beam but not gcsfs as tests use local beam runner "cubed[diagnostics,lithops]", # modal tests separate due to conflicting package reqs "dill", "numpy_groupies", @@ -74,6 +73,14 @@ test = [ "pytest-cov", "pytest-mock", ] +test-beam = [ + "cubed[beam,diagnostics]", + "dill", + "numpy_groupies", + "pytest", + "pytest-cov", + "pytest-mock", +] test-dask = [ "cubed[dask,diagnostics]", "dill",