Skip to content

Commit 688a5ab

Browse files
Fix pytest outside Pycharm
1 parent ca3140e commit 688a5ab

File tree

1 file changed

+15
-13
lines changed

1 file changed

+15
-13
lines changed

.github/workflows/build.yaml

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -28,34 +28,36 @@ jobs:
2828
if: always()
2929
run: docker compose logs
3030

31-
- name: Install Poetry
32-
run: |
33-
set -e
34-
35-
curl -sSL https://install.python-poetry.org | python3 -
36-
- name: Install Dependencies
37-
run: |
38-
set -e
39-
40-
/github/home/.local/bin/poetry install --all-extras
31+
- uses: actions/setup-python@v5
32+
with:
33+
python-version: '3.11.x' # Version range or exact version of a Python version to use, using SemVer's version range syntax
34+
architecture: 'x64' # optional x64 or x86. Defaults to x64 if not specified
35+
36+
- name: Install Poetry and dependencies
37+
uses: SneaksAndData/github-actions/install_poetry@v0.1.11
38+
with:
39+
install_extras: all
40+
4141
- name: Black
4242
shell: bash
4343
run: |
4444
set -e
45-
/github/home/.local/bin/poetry run black . --check --diff
45+
46+
poetry run black . --check --diff
4647
- name: Lint
4748
run: |
4849
set -e
4950

50-
find ./spark_utils -type f -name "*.py" | xargs /github/home/.local/bin/poetry run pylint
51+
find ./spark_utils -type f -name "*.py" | xargs poetry run pylint
52+
5153
- name: Unit test
5254
shell: bash
5355
env:
5456
PYSPARK_SUBMIT_ARGS: "--packages org.apache.iceberg:iceberg-spark-runtime-3.5_2.12:1.10.0,org.apache.iceberg:iceberg-aws-bundle:1.10.0,io.delta:delta-spark_2.12:3.2.1 pyspark-shell"
5557
run: |
5658
set -euxo pipefail
5759

58-
/github/home/.local/bin/poetry run pytest --cov-config=.coveragerc --doctest-modules --junitxml=junit/test-results.xml --cov=. --cov-report=term-missing:skip-covered | tee pytest-coverage.txt
60+
poetry run pytest --cov-config=.coveragerc --doctest-modules --junitxml=junit/test-results.xml --cov=. --cov-report=term-missing:skip-covered | tee pytest-coverage.txt
5961
- name: Publish Code Coverage
6062
uses: MishaKav/pytest-coverage-comment@main
6163
with:

0 commit comments

Comments
 (0)