Skip to content

Commit

Permalink
fix: raise warning when pytest not found
Browse files Browse the repository at this point in the history
  • Loading branch information
armand-sauzay committed Feb 27, 2024
1 parent d153146 commit 885810b
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 52 deletions.
101 changes: 50 additions & 51 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,54 +20,53 @@ jobs:
- uses: open-turo/actions-gha/test@v2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}

# lint-oss tries to run this action against open source repositories not in
# open-turo to make sure this is usable outside the org.
# Repositories added to this list should have pre-commit hooks that don't
# require external tooling to be installed.
# Repositories added to this list must have passing pre-commit hooks.
lint-oss:
name: Lint / Open source
runs-on: ubuntu-latest
strategy:
matrix:
repos:
- disposable/disposable
- cloud-custodian/cloud-custodian
- aws/aws-sdk-pandas
- google/uv-metrics
steps:
- uses: actions/checkout@v4
with:
repository: ${{ matrix.repos }}
# TODO: Remove branch reference
- uses: open-turo/actions-python/lint@fix/update-action-pre-commit-to-v2
with:
checkout-repo: false
# with:
# github-token: ${{ secrets.GITHUB_TOKEN }}

# test-oss tries to run this action against open source repositories not in
# open-turo to make sure this is usable outside the org.
# Repositories added to this list should be pyproject.toml based repositories.
# Repositories added to this list must have passing builds.
test-oss:
name: Test / Open source
runs-on: ubuntu-latest
strategy:
matrix:
repos:
- aws/aws-sdk-pandas
- copier-org/copier
- hvac/hvac
- tiangolo/asyncer
- tiangolo/fastapi
steps:
- uses: actions/checkout@v4
with:
repository: ${{ matrix.repos }}
# TODO: Remove branch reference
- uses: open-turo/actions-python/test@fix/update-action-pre-commit-to-v2
with:
checkout-repo: false
github-token: ${{ secrets.GITHUB_TOKEN }}
# # lint-oss tries to run this action against open source repositories not in
# # open-turo to make sure this is usable outside the org.
# # Repositories added to this list should have pre-commit hooks that don't
# # require external tooling to be installed.
# # Repositories added to this list must have passing pre-commit hooks.
# lint-oss:
# name: Lint / Open source
# runs-on: ubuntu-latest
# strategy:
# matrix:
# repos:
# - disposable/disposable
# - cloud-custodian/cloud-custodian
# - aws/aws-sdk-pandas
# - google/uv-metrics
# steps:
# - uses: actions/checkout@v4
# with:
# repository: ${{ matrix.repos }}
# # TODO: Remove branch reference
# - uses: open-turo/actions-python/lint@fix/update-action-pre-commit-to-v2
# with:
# checkout-repo: false
# # with:
# # github-token: ${{ secrets.GITHUB_TOKEN }}
#
# # test-oss tries to run this action against open source repositories not in
# # open-turo to make sure this is usable outside the org.
# # Repositories added to this list should be pyproject.toml based repositories.
# # Repositories added to this list must have passing builds.
# test-oss:
# name: Test / Open source
# runs-on: ubuntu-latest
# strategy:
# matrix:
# repos:
# - aws/aws-sdk-pandas
# - copier-org/copier
# - hvac/hvac
# - tiangolo/asyncer
# - tiangolo/fastapi
# steps:
# - uses: actions/checkout@v4
# with:
# repository: ${{ matrix.repos }}
# # TODO: Remove branch reference
# - uses: open-turo/actions-python/test@fix/update-action-pre-commit-to-v2
# with:
# checkout-repo: false
# github-token: ${{ secrets.GITHUB_TOKEN }}
4 changes: 3 additions & 1 deletion test/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ runs:
if: hashFiles('poetry.lock') != ''
shell: bash
run: |
if poetry export --without-hashes --format=requirements.txt | grep 'pytest' &>/dev/null; then
if poetry show pytest &>/dev/null; then
poetry run pytest ${{ inputs.test-flags }}
else
echo "::warning::pytest not found in poetry.lock"
fi

0 comments on commit 885810b

Please sign in to comment.