forked from AstarVienna/irdb
-
Notifications
You must be signed in to change notification settings - Fork 0
71 lines (64 loc) · 2.26 KB
/
internal_tests.yml
File metadata and controls
71 lines (64 loc) · 2.26 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
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"