From db8e8dcf8992a7facf404c54333c8fd8f85510d7 Mon Sep 17 00:00:00 2001
From: DriesSchaumont <5946712+DriesSchaumont@users.noreply.github.com>
Date: Thu, 4 Jul 2024 09:00:08 +0000
Subject: [PATCH] Update CI
---
.github/workflows/create-documentation-pr.yml | 68 +++++--------------
.github/workflows/integration-test.yml | 4 +-
.github/workflows/main-build.yml | 26 ++++---
.github/workflows/release-build.yml | 6 +-
.github/workflows/viash-test.yml | 15 ++--
5 files changed, 42 insertions(+), 77 deletions(-)
diff --git a/.github/workflows/create-documentation-pr.yml b/.github/workflows/create-documentation-pr.yml
index 54a9c81562d..0455ef75712 100644
--- a/.github/workflows/create-documentation-pr.yml
+++ b/.github/workflows/create-documentation-pr.yml
@@ -13,55 +13,8 @@ on:
- '*'
jobs:
- list:
- runs-on: ubuntu-latest
-
- outputs:
- component_matrix: ${{ steps.set_matrix.outputs.components }}
- workflow_matrix: ${{ steps.set_matrix.outputs.workflows }}
- steps:
- - uses: actions/checkout@v4
-
- - uses: viash-io/viash-actions/setup@v5
-
- - id: ns_list_components
- uses: viash-io/viash-actions/ns-list@v5
- with:
- platform: docker
- format: json
- query_namespace: ^(?!workflows)
-
- - id: ns_list_workflows
- uses: viash-io/viash-actions/ns-list@v5
- with:
- format: json
- query_namespace: ^workflows
-
- - id: set_matrix
- run: |
- echo "components=$(jq -c '[ .[] |
- {
- "name": .functionality.name,
- "namespace_separator": .platforms | map(select(.type == "docker"))[0].namespace_separator,
- "namespace": .functionality.namespace,
- "config": .info.config,
- "dir": .info.config | capture("^(?
.*\/)").dir
- }
- ]' ${{ steps.ns_list_components.outputs.output_file }} )" >> $GITHUB_OUTPUT
-
- echo "workflows=$(jq -c '[ .[] |
- {
- "name": $config.functionality.name,
- "namespace": $config.functionality.namespace,
- "main_script": ((.info.config | capture("^(?.*\/)").dir) + "/" + (.functionality.test_resources | map(select(.type == "nextflow_script")) | unique | .[].path )),
- "config": .info.config,
- "entry": .functionality.test_resources | map(select(.type == "nextflow_script")) | .[].entrypoint
- }
- ]' ${{ steps.ns_list_workflows.outputs.output_file }} )" >> $GITHUB_OUTPUT
-
push_documentation:
runs-on: ubuntu-latest
- needs: [ list ]
steps:
- uses: actions/checkout@v4
@@ -74,7 +27,7 @@ jobs:
path: website
token: ${{ secrets.GTHB_PAT }}
- - uses: viash-io/viash-actions/setup@v5
+ - uses: viash-io/viash-actions/setup@v6
- name: Get tag to use
id: get_tag
@@ -83,12 +36,25 @@ jobs:
TAG_OR_BRANCH_NAME=${INPUT_TAG:-"${{ github.ref_name }}"}
echo "tag=$TAG_OR_BRANCH_NAME" >> $GITHUB_OUTPUT
- - uses: viash-io/viash-actions/pro/generate-documentation-qmd@v5
+ - uses: viash-io/viash-actions/pro/generate-documentation-qmd@v6
+ with:
+ project_directory: openpipelines
+ src: ./
+ query: '^(?!workflows)'
+ output_dir: ../website/components/modules/
+ dest_path: "{namespace}/{name}.qmd"
+ viash_pro_token: ${{ secrets.GTHB_PAT }}
+ tools_version: main_build
+ ref: "${{ steps.get_tag.outputs.tag }}"
+
+
+ - uses: viash-io/viash-actions/pro/generate-documentation-qmd@v6
with:
project_directory: openpipelines
src: ./
- output_dir: ../website/components/
- dest_path: "{type}s/{namespace}/{name}.qmd"
+ query: '^workflows'
+ output_dir: ../website/components/workflows/
+ dest_path: "{namespace}/{name}.qmd"
viash_pro_token: ${{ secrets.GTHB_PAT }}
tools_version: main_build
ref: "${{ steps.get_tag.outputs.tag }}"
diff --git a/.github/workflows/integration-test.yml b/.github/workflows/integration-test.yml
index 9aa374cdb01..6c5d92c75ac 100644
--- a/.github/workflows/integration-test.yml
+++ b/.github/workflows/integration-test.yml
@@ -35,7 +35,7 @@ jobs:
cache_key: ${{ steps.cache.outputs.cache_key }}
steps:
- - uses: viash-io/viash-actions/project/sync-and-cache-s3@v5
+ - uses: viash-io/viash-actions/project/sync-and-cache-s3@v6
id: cache
with:
s3_bucket: $s3_bucket
@@ -65,7 +65,7 @@ jobs:
with:
ref: 'integration_build'
- - uses: viash-io/viash-actions/setup@v5
+ - uses: viash-io/viash-actions/setup@v6
- uses: nf-core/setup-nextflow@v2.0.0
diff --git a/.github/workflows/main-build.yml b/.github/workflows/main-build.yml
index acb3f844da3..a0526dd1068 100644
--- a/.github/workflows/main-build.yml
+++ b/.github/workflows/main-build.yml
@@ -131,14 +131,14 @@ jobs:
git fetch origin ${{github.ref_name}}
git checkout -f --no-overlay origin/${{github.ref_name}} -- '.'
- - uses: viash-io/viash-actions/setup@v5
+ - uses: viash-io/viash-actions/setup@v6
- name: Remove target folder from .gitignore
run: |
# allow publishing the target folder
sed -i '/^\/target\/$/d' .gitignore
- - uses: viash-io/viash-actions/ns-build@v5
+ - uses: viash-io/viash-actions/ns-build@v6
with:
config_mod: |
.functionality.version := "${{ inputs.version || format('{0}_build', github.ref_name) }}"
@@ -146,26 +146,24 @@ jobs:
parallel: true
query: ^(?!workflows)
- - uses: viash-io/viash-actions/ns-build@v5
+ - uses: viash-io/viash-actions/ns-build@v6
with:
config_mod: .functionality.version := "${{ inputs.version || format('{0}_build', github.ref_name) }}"
parallel: true
query: ^workflows
- name: Build nextflow schemas
- uses: viash-io/viash-actions/pro/build-nextflow-schemas@v5
+ uses: viash-io/viash-actions/pro/build-nextflow-schemas@v6
with:
- components: src
- workflows: src
+ target_dir: target/nextflow
viash_pro_token: ${{ secrets.GTHB_PAT }}
tools_version: 'main_build'
enable_dataset_input: true
- name: Build parameter files
- uses: viash-io/viash-actions/pro/build-nextflow-params@v5
+ uses: viash-io/viash-actions/pro/build-nextflow-params@v6
with:
- workflows: src
- components: src
+ target_dir: target/nextflow
viash_pro_token: ${{ secrets.GTHB_PAT }}
tools_version: 'main_build'
@@ -178,7 +176,7 @@ jobs:
branch: ${{ !inputs.deploy_branch && format('{0}_build', github.ref_name) || inputs.deploy_branch }}
- name: "List components"
id: ns_list
- uses: viash-io/viash-actions/ns-list@v5
+ uses: viash-io/viash-actions/ns-list@v6
with:
platform: docker
src: src
@@ -187,7 +185,7 @@ jobs:
- name: "List workflows"
id: ns_list_workflows
- uses: viash-io/viash-actions/ns-list@v5
+ uses: viash-io/viash-actions/ns-list@v6
with:
src: src
format: json
@@ -235,10 +233,10 @@ jobs:
- uses: actions/checkout@v4
- - uses: viash-io/viash-actions/setup@v5
+ - uses: viash-io/viash-actions/setup@v6
- name: Build container
- uses: viash-io/viash-actions/ns-build@v5
+ uses: viash-io/viash-actions/ns-build@v6
with:
config_mod: |
.functionality.version := "${{ inputs.version || format('{0}_build', github.ref_name) }}"
@@ -255,7 +253,7 @@ jobs:
password: ${{ secrets.GTHB_PAT }}
- name: Push container
- uses: viash-io/viash-actions/ns-build@v5
+ uses: viash-io/viash-actions/ns-build@v6
with:
config_mod: .functionality.version := "${{ inputs.version || format('{0}_build', github.ref_name) }}"
platform: docker
diff --git a/.github/workflows/release-build.yml b/.github/workflows/release-build.yml
index d5047f5f933..80863937b34 100644
--- a/.github/workflows/release-build.yml
+++ b/.github/workflows/release-build.yml
@@ -28,7 +28,7 @@ jobs:
cache_key: ${{ steps.cache.outputs.cache_key }}
steps:
- - uses: viash-io/viash-actions/project/sync-and-cache-s3@v5
+ - uses: viash-io/viash-actions/project/sync-and-cache-s3@v6
id: cache
with:
s3_bucket: $s3_bucket
@@ -58,7 +58,7 @@ jobs:
with:
ref: 'integration_build'
- - uses: viash-io/viash-actions/setup@v5
+ - uses: viash-io/viash-actions/setup@v6
- uses: nf-core/setup-nextflow@v2.0.0
@@ -123,7 +123,7 @@ jobs:
- uses: actions/checkout@v4
- - uses: viash-io/viash-actions/setup@v5
+ - uses: viash-io/viash-actions/setup@v6
# use cache
- name: Cache resources data
diff --git a/.github/workflows/viash-test.yml b/.github/workflows/viash-test.yml
index 48f52234fab..e6177fa84cd 100644
--- a/.github/workflows/viash-test.yml
+++ b/.github/workflows/viash-test.yml
@@ -41,13 +41,14 @@ jobs:
with:
fetch-depth: 0
- - uses: viash-io/viash-actions/setup@v5
+ - uses: viash-io/viash-actions/setup@v6
- name: Check if all config can be parsed if there is no unicode support
run: |
LANG=C viash ns list > /dev/null
+ JAVA_TOOL_OPTIONS=-Dfile.encoding=ascii viash ns build --parallel --setup meh > /dev/null
- - uses: viash-io/viash-actions/project/sync-and-cache-s3@v5
+ - uses: viash-io/viash-actions/project/sync-and-cache-s3@v6
id: cache
with:
s3_bucket: $s3_bucket
@@ -55,14 +56,14 @@ jobs:
cache_key_prefix: resources_test__
- id: ns_list
- uses: viash-io/viash-actions/ns-list@v5
+ uses: viash-io/viash-actions/ns-list@v6
with:
platform: docker
format: json
query_namespace: ^(?!workflows)
- id: ns_list_filtered
- uses: viash-io/viash-actions/project/detect-changed-components@v5
+ uses: viash-io/viash-actions/project/detect-changed-components@v6
with:
input_file: "${{ steps.ns_list.outputs.output_file }}"
@@ -95,7 +96,7 @@ jobs:
- uses: actions/checkout@v4
- - uses: viash-io/viash-actions/setup@v5
+ - uses: viash-io/viash-actions/setup@v6
# use cache
- name: Cache resources data
@@ -163,10 +164,10 @@ jobs:
password: ${{ env.NVIDIA_PASSWORD }}
- name: Run test
- timeout-minutes: 30
+ timeout-minutes: 40
run: |
viash test \
"${{ matrix.component.config }}" \
--cpus 4 \
- --memory "12gb"
+ --memory "14gb"