Skip to content

Commit

Permalink
run tutoral linting via tutorial .validate scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
wxtim committed Jan 25, 2024
1 parent 2b12447 commit fc175b7
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 7 deletions.
7 changes: 0 additions & 7 deletions .github/workflows/test_tutorial_workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,6 @@ jobs:
- name: install cylc-flow
run: pip install .[all]

- name: lint tutorials
run: |
cylc get-resources tutorial
for f in $(find "${HOME}/cylc-src" -name flow*.cylc -exec dirname {} \;);
do cylc lint $f -r style
done
- name: run tutorial workflow
timeout-minutes: 6
run: |
Expand Down
1 change: 1 addition & 0 deletions cylc/flow/etc/tutorial/consolidation-tutorial/.validate
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,5 @@

set -eux

cylc lint .
cylc validate . --icp=2000
1 change: 1 addition & 0 deletions cylc/flow/etc/tutorial/cylc-forecasting-workflow/.validate
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
set -eux
APIKEY="$(head --lines 1 ../api-keys)"
FLOW_NAME="$(< /dev/urandom tr -dc A-Za-z | head -c6)"
cylc lint .
cylc install --workflow-name "$FLOW_NAME" --no-run-name
sed -i "s/DATAPOINT_API_KEY/$APIKEY/" "$HOME/cylc-run/$FLOW_NAME/flow.cylc"
cylc validate --check-circular --icp=2000 "$FLOW_NAME"
Expand Down
1 change: 1 addition & 0 deletions cylc/flow/etc/tutorial/retries-tutorial/.validate
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,5 @@

set -eux

cylc lint .
cylc validate --check-circular . --icp=2000
1 change: 1 addition & 0 deletions cylc/flow/etc/tutorial/runtime-introduction/.validate
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
set -eux
FLOW_NAME="$(< /dev/urandom tr -dc A-Za-z | head -c6)"
SRC=$(cylc get-resources tutorial 2>&1 | head -n1 | awk '{print $NF}')
cylc lint .
cylc install "${SRC}/runtime-introduction" --workflow-name "$FLOW_NAME" --no-run-name
cylc validate --check-circular --icp=2000 "$FLOW_NAME"
cylc play --no-detach --abort-if-any-task-fails "$FLOW_NAME"
Expand Down

0 comments on commit fc175b7

Please sign in to comment.