Skip to content

Commit 68ae4e7

Browse files
authored
Merge pull request #502 from stan-dev/manual-testing
Update workflow to allow manual runs on different CmdStan versions
2 parents aeacdf8 + e04e217 commit 68ae4e7

1 file changed

Lines changed: 13 additions & 2 deletions

File tree

.github/workflows/main.yml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: CmdStanPy
2-
2+
33
on:
44
push:
55
branches:
@@ -8,6 +8,13 @@ on:
88
tags:
99
- '**'
1010
pull_request:
11+
workflow_dispatch:
12+
inputs:
13+
cmdstan-version:
14+
description: 'Version to test'
15+
required: false
16+
default: 'latest'
17+
1118
jobs:
1219
get-cmdstan-version:
1320
# get the latest cmdstan version to use as part of the cache key
@@ -17,7 +24,11 @@ jobs:
1724
- name: Get CmdStan version
1825
id: check-cmdstan
1926
run: |
20-
echo "::set-output name=version::$(python -c 'import requests;print(requests.get("https://api.github.com/repos/stan-dev/cmdstan/releases/latest").json()["tag_name"][1:])')"
27+
if [[ "${{ github.event.inputs.cmdstan-version }}" == "latest" ]]; then
28+
echo "::set-output name=version::${{ github.event.inputs.cmdstan-version }}"
29+
else
30+
echo "::set-output name=version::$(python -c 'import requests;print(requests.get("https://api.github.com/repos/stan-dev/cmdstan/releases/latest").json()["tag_name"][1:])')"
31+
fi
2132
outputs:
2233
version: ${{ steps.check-cmdstan.outputs.version }}
2334

0 commit comments

Comments
 (0)