Skip to content

Commit

Permalink
use poetry as the runner
Browse files Browse the repository at this point in the history
  • Loading branch information
onerandomusername committed Sep 25, 2024
1 parent 0d846b8 commit ce10fbb
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/lint_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ jobs:

# Install our dependencies if we did not restore a dependency cache
- name: Install dependencies using poetry
if: steps.python_cache.outputs.cache-hit != 'true'
# if: steps.python_cache.outputs.cache-hit != 'true'
run: |
pip install poetry
poetry install --no-interaction --no-ansi
Expand All @@ -93,14 +93,14 @@ jobs:
# we set PIP_USER=0 to not do a user install.
- name: Run pre-commit hooks
id: pre-commit
run: export PIP_USER=0; SKIP="no-commit-to-branch,black,flake8" pre-commit run --all-files
run: export PIP_USER=0; SKIP="no-commit-to-branch,black,flake8" poetry run pre-commit run --all-files

# Run black seperately as we don't want to reformat the files
# just error if something isn't formatted correctly.
- name: Check files with black
id: black
if: always() && (steps.pre-commit.outcome == 'success' || steps.pre-commit.outcome == 'failure')
run: black . --check --diff --color
run: poetry run black . --check --diff --color

# Run flake8 and have it format the linting errors in the format of
# the GitHub Workflow command to register error annotations. This
Expand All @@ -113,7 +113,7 @@ jobs:
- name: Run flake8
id: flake8
if: always() && (steps.pre-commit.outcome == 'success' || steps.pre-commit.outcome == 'failure')
run: "flake8 \
run: "poetry run flake8 \
--format='::error file=%(path)s,line=%(row)d,col=%(col)d::\
[flake8] %(code)s: %(text)s'"

Expand Down Expand Up @@ -158,7 +158,7 @@ jobs:

# Install our dependencies if we did not restore a dependency cache
- name: Install dependencies using poetry
if: steps.python_cache.outputs.cache-hit != 'true'
# if: steps.python_cache.outputs.cache-hit != 'true'
run: |
python -m pip install poetry
python -m poetry install --no-interaction --no-ansi
Expand All @@ -168,7 +168,7 @@ jobs:
# coverage report to github.
- name: Run tests and generate coverage report
id: run_tests
run: python -m pytest tests -n auto --dist loadfile --cov --disable-warnings -q
run: poetry run pytest tests -n auto --dist loadfile --cov --disable-warnings -q

# This step will publish the coverage reports to coveralls.io and
# print a "job" link in the output of the GitHub Action
Expand All @@ -183,7 +183,7 @@ jobs:
COVERALLS_FLAG_NAME: coverage-${{ runner.os }}-python-${{ env.PYTHON_VERSION }}
COVERALLS_PARALLEL: true
COVERALLS_SERVICE_NAME: github
run: python -m coveralls
run: poetry run coveralls

coveralls-finish:
name: Indicate completion to coveralls.io
Expand Down

0 comments on commit ce10fbb

Please sign in to comment.