forked from AstarVienna/irdb
-
Notifications
You must be signed in to change notification settings - Fork 0
79 lines (72 loc) · 2.51 KB
/
tests.yml
File metadata and controls
79 lines (72 loc) · 2.51 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
72
73
74
75
76
77
78
79
# Needs to be called from elsewhere or triggered manually.
# This allows for running the IRDB tests for any new branch in ScopeSim
# or ScopeSim_Templates, without the need for a corresponding IRDB branch if
# that's not required anyway.
# Note: If no options are passed, this installs ScopeSim and Templates from
# the main branch in either repo.
name: 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:
tests:
name: Test against ScopeSim and Templates
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
python-version: ['3.10', '3.11', '3.12', '3.13']
steps:
- uses: actions/checkout@v6
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- 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
run: pytest