Skip to content

Commit

Permalink
Merge pull request #28 from AstarVienna/teutoburg-patch-1
Browse files Browse the repository at this point in the history
Fix workflow for non-poetry repos
  • Loading branch information
teutoburg authored Aug 27, 2024
2 parents 3463d40 + e74e306 commit 0d5a224
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ on:
type: boolean
description: "Use Poetry-based workflow."
required: false
default: true

# Allow this workflow to be called from other repositories.
workflow_call:
Expand All @@ -26,6 +27,7 @@ on:
type: boolean
description: "Use Poetry-based workflow."
required: false
default: true

jobs:
run-tests:
Expand All @@ -46,23 +48,23 @@ jobs:
python-version: ${{ matrix.python-version }}

- name: Set up Poetry
if: ${{ inputs.poetry || github.event_name == 'push' || github.event_name == 'pull_request' }}
if: ${{ inputs.poetry }}
uses: abatilo/actions-poetry@v3
with:
poetry-version: "1.8.3"

- name: Install dependencies with Poetry
if: ${{ inputs.poetry || github.event_name == 'push' || github.event_name == 'pull_request' }}
if: ${{ inputs.poetry }}
run: |
poetry install --with test --all-extras
poetry add git+https://github.com/AstarVienna/ScopeSim_Data.git
- name: Run Pytest with Poetry
if: ${{ inputs.poetry || github.event_name == 'push' || github.event_name == 'pull_request' }}
if: ${{ inputs.poetry }}
run: poetry run pytest -m "not webtest" --cov --cov-report=xml

- name: Install dependencies without Poetry
if: ${{ ! inputs.poetry && github.event_name != 'push' && github.event_name != 'pull_request' }}
if: ${{ ! inputs.poetry }}
run: |
python -m pip install --upgrade pip
pip install git+https://github.com/AstarVienna/ScopeSim_Data.git
Expand All @@ -77,7 +79,7 @@ jobs:
pip install pytest pytest-cov
- name: Run Pytest without Poetry
if: ${{ ! inputs.poetry && github.event_name != 'push' && github.event_name != 'pull_request' }}
if: ${{ ! inputs.poetry }}
run: pytest -m "not webtest" --cov --cov-report=xml

- name: Upload coverage reports to Codecov
Expand Down

0 comments on commit 0d5a224

Please sign in to comment.