reanahub / reana-demo-helloworld

REANA example - "hello world"
MIT License
3 stars 35 forks source link

ci: enrich validation step #54

Closed tiborsimko closed 3 years ago

tiborsimko commented 3 years ago

We have many REANA spec files now:

$ ls -l reana*.yaml | wc -l
10

But in the GitHub CI "Validate workflow" test, we are using only Yadage:

$ rg -A 2 Validate         
.github/workflows/ci.yml
28:      - name: Validate workflow
29-        run: yadage-validate workflow/yadage/workflow.yaml | grep -q 'workflow validates'

We should plug validation of all the workflows.

P.S. Some demo examples use reana-client for validation.

P.S. The same applies to reana-demo-root6-roofit and reana-demo-worldpopulation.

tiborsimko commented 3 years ago

BTW, running docker to verify steps is good, but that could be another CI check, so that we separate "Validate workflows" (using r-client) and "Run workflow" (in serial mode, using Docker, which is good for testing containers and source commands in a "vanilla" mode, without having access to REANA cluster.

If we want to get extra fancy, we could introduce separate "Run workflow" tests with running on naked CWL/Yadage/Serial-on-Docker/Snakemake environment, using the usual out-of-REANA instructions that we document there, i.e. mkdir snakemake-local-run etc.

Advantage: we would catch automatically when demo examples cannot be run outside REANA anymore.

mvidalgarcia commented 3 years ago
tiborsimko commented 3 years ago

The r-d-helloworld runs one check only, called build, and the various tests are performed there. What about running these tests separately? In this way we'll see faster which one failed, and the checks would be more appropriately called than only "build". Something like;

mvidalgarcia commented 3 years ago

I've introduced a composite action to avoid code repetition.

Right now it's hosted in the same repo, but we should consider creating a repo called reana-actions or similar to host actions and use them across all our repos. E.g. All the demos would benefit from the local-run composite action that I've created in the r-d-helloworld.