Skip to content

Commit

Permalink
Add an example of a Cylc Checking Github Workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
wxtim committed May 23, 2024
1 parent 9f4afd4 commit 0c43a6a
Show file tree
Hide file tree
Showing 5 changed files with 62 additions and 2 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/cylc-checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Cylc Checks

on:
push:
branches: [master, cylc-8]
pull_request:
branches: [master, cylc-8]
workflow_dispatch:


jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Python
uses: actions/setup-python@v3

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install cylc-flow
- name: Checking workflow with Cylc Lint
run: |
cylc lint --color=always ./simplest
- name: Checking workflow with Cylc Lint
run: |
cylc validate --color=always ./simplest
13 changes: 13 additions & 0 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
Zero-Clause BSD
=============

Permission to use, copy, modify, and/or distribute this software for
any purpose with or without fee is hereby granted.

THE SOFTWARE IS PROVIDED β€œAS IS” AND THE AUTHOR DISCLAIMS ALL
WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE
FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY
DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
10 changes: 9 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ You may find these easier to start with than writing a suite from scratch.
| Name | Written For | Tested With |
| -------------------------------------------------------------------------------- | ------------ | ------------ |
| **[πŸ”—](https://github.com/wxtim/workflows/tree/cylc-8/biggish)** A large random workflow | 8.x | 8.03 |
| **[πŸ”—](https://github.com/wxtim/workflows/tree/cylc-8/simplest)** Simplest Workflow | 7.x | 7.8.11 |
| **[πŸ”—](https://github.com/wxtim/workflows/tree/cylc-8/simplest)** Simplest Workflow [![Cylc Checks](https://github.com/wxtim/workflows/actions/workflows/cylc-checks.yml/badge.svg)](https://github.com/wxtim/workflows/actions/workflows/cylc-checks.yml) | 7.x | 7.8.11 |
| **[πŸ”—](https://github.com/wxtim/workflows/tree/cylc-8/optional-outputs)** Optional outputs | 8.x | 8.0.3 |
| **[πŸ”—](https://github.com/wxtim/workflows/tree/cylc-8/warning)** Have Cylc Send an email when a task uses Cylc Message | 7.x | 7.8.7 |
| **[πŸ”—](https://github.com/wxtim/workflows/tree/cylc-8/return-info)** Passing Station Lists | 7.x | 7.8.11 |
Expand All @@ -24,3 +24,11 @@ You may find these easier to start with than writing a suite from scratch.
| **[πŸ”—](https://github.com/wxtim/workflows/tree/cylc-8/queues)** Demonstration of Queues and Parameterization | 7.x | 8.1.0 |
| **[πŸ”—](https://github.com/wxtim/workflows/tree/cylc-8/clock-trigger)** Suite daily cycling triggered by clock. | 8.x | 8.0.3 |
| **[πŸ”—](https://github.com/wxtim/workflows/tree/cylc-8/pythonconflict)** Remove Cylc Lib from Path | 7.8.7 | 8.1.0 |


# License

I've used 0-clause BSD. That should leave you nicely free. If you are not convinced
that it allows your use case you can and should ask me.

I'd love to know if you find any of this useful.
7 changes: 6 additions & 1 deletion simplest/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
### Simplest Workflow
Should give you just enough to get going

[![Cylc Checks](https://github.com/wxtim/workflows/actions/workflows/cylc-checks.yml/badge.svg)](https://github.com/wxtim/workflows/actions/workflows/cylc-checks.yml)

Should give you just enough to get going.

GitHub Actions Validation carried out by the following script:
https://github.com/wxtim/workflows/blob/cylc-8/.github/workflows/cylc-checks.yml
2 changes: 2 additions & 0 deletions strange-parameters/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,5 @@ Use a function to generate task parameter numbers.
### Case: Tasks which occur in prime number cycling
Cicadas reproduce in prime numbers of years to avoid
predators.

![graph of workflow](graph.svg)

0 comments on commit 0c43a6a

Please sign in to comment.