Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
71 changes: 71 additions & 0 deletions .github/workflows/internal_tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
# Any IRDB functionality not related to a specific instrument package.
# Has to be triggered from elsewhere like tests.yml or notebooktests.yml.

name: Internal functionality tests
on:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
inputs:
from_pypi:
type: boolean
description: "Use plain pip install and ignore branch names below."
required: false
default: false
ScopeSim:
type: string
description: "Branch name to install ScopeSim from."
required: false
default: main
ScopeSim_Templates:
type: string
description: "Branch name to install ScopeSim_Templates from."
required: false
default: main

# Allow this workflow to be called from other repositories.
workflow_call:
inputs:
from_pypi:
type: boolean
description: "Use plain pip install and ignore branch names below."
required: false
default: false
ScopeSim:
type: string
description: "Branch name to install ScopeSim from."
required: false
default: main
ScopeSim_Templates:
type: string
description: "Branch name to install ScopeSim_Templates from."
required: false
default: main

jobs:
irdb_test:
name: Run internal tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6

- name: Set up Python
uses: actions/setup-python@v6
with:
# No matrix is used since this is a time-consuming task.
python-version: 3.13

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.github_actions.txt

- name: Install ScopeSim from repo
if: ${{ inputs.from_pypi == false || inputs.from_pypi == 'false' }}
run: |
echo "Re-installing ScopeSim from source" >> $GITHUB_STEP_SUMMARY
pip uninstall -y scopesim scopesim_templates
pip install git+https://github.com/AstarVienna/ScopeSim.git@${{ inputs.ScopeSim }}
pip install git+https://github.com/AstarVienna/ScopeSim_Templates.git@${{ inputs.ScopeSim_Templates }}

- name: Run Pytest for internal tests
run: pytest -m "irdb"
4 changes: 4 additions & 0 deletions .github/workflows/tests_dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ jobs:
name: Tests
uses: ./.github/workflows/tests.yml

tests:
name: Internal Tests
uses: ./.github/workflows/internal_tests.yml

notebook_tests:
name: Notebook tests
uses: ./.github/workflows/notebooktests.yml
Expand Down
9 changes: 9 additions & 0 deletions .github/workflows/tests_dev_pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,15 @@ jobs:
ScopeSim: ${{ needs.determine_branches.outputs.ScopeSim }}
ScopeSIM_Templates: ${{ needs.determine_branches.outputs.ScopeSIM_Templates }}

internal_tests:
name: Internal Tests
needs: determine_branches
if: contains(github.event.pull_request.labels.*.name, 'irdb functionality')
uses: ./.github/workflows/internal_tests.yml
with:
ScopeSim: ${{ needs.determine_branches.outputs.ScopeSim }}
ScopeSIM_Templates: ${{ needs.determine_branches.outputs.ScopeSIM_Templates }}

notebook_tests:
name: Notebook tests
needs: determine_branches
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/tests_main_pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@ jobs:
with:
from_pypi: true

internal_tests:
name: Internal Tests
uses: ./.github/workflows/internal_tests.yml
with:
from_pypi: true

notebook_tests:
name: Notebook tests
uses: ./.github/workflows/notebooktests.yml
Expand Down
Loading