Skip to content

Commit adda9db

Browse files
authored
Merge pull request #851 from viash-io/develop
Develop
2 parents 0587552 + 387f446 commit adda9db

File tree

106 files changed

+3569
-4997
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

106 files changed

+3569
-4997
lines changed

.github/workflows/ns_test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ jobs:
77
runs-on: ubuntu-latest
88

99
steps:
10-
- uses: actions/checkout@v4
10+
- uses: actions/checkout@v5
1111

1212
- name: Set up java
13-
uses: actions/setup-java@v4
13+
uses: actions/setup-java@v5
1414
with:
1515
distribution: temurin
1616
java-version: '11'

.github/workflows/prep_release.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ jobs:
1212

1313
steps:
1414
- name: Checkout code
15-
uses: actions/checkout@v4
15+
uses: actions/checkout@v5
1616

1717
- name: Set up JDK 17
18-
uses: actions/setup-java@v4
18+
uses: actions/setup-java@v5
1919
with:
2020
java-version: '17'
2121
distribution: 'temurin'
@@ -39,11 +39,13 @@ jobs:
3939
id: get_version
4040
run: |
4141
viash_version=$(bin/viash --version | cut -d ' ' -f 2)
42+
viash_minor_version=$(echo $viash_version | cut -d. -f1,2)
4243
echo "Detected Viash version: $viash_version"
44+
echo "Detected Viash minor version: $viash_minor_version"
4345
echo "viash_version=$viash_version" >> "$GITHUB_OUTPUT"
4446
4547
# fetch relevant changelog section
46-
changelog_section=$(awk "/# Viash ${viash_version}.*/{flag=1;next}/^# /{flag=0}flag" CHANGELOG.md)
48+
changelog_section=$(awk "/# Viash ${viash_version}.*/{flag=1;print;next}/^# /{flag=0}flag" CHANGELOGS/CHANGELOG_${viash_minor_version}.md)
4749
4850
echo "changelog_section<<GITHUB_EOF" >> "$GITHUB_OUTPUT"
4951
echo "$changelog_section" >> "$GITHUB_OUTPUT"

.github/workflows/sbt_test.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
- { ver: '21', run_nextflow: true, run_coverage: false, nxf_ver: latest-edge }
2020

2121
steps:
22-
- uses: actions/checkout@v4
22+
- uses: actions/checkout@v5
2323

2424
- uses: viash-io/viash-actions/project/update-docker-engine@v6
2525
if: runner.os == 'Linux'
@@ -37,7 +37,7 @@ jobs:
3737
testthat
3838
3939
- name: Set up java
40-
uses: actions/setup-java@v4
40+
uses: actions/setup-java@v5
4141
with:
4242
distribution: temurin
4343
java-version: ${{ matrix.java.ver }}
@@ -55,7 +55,7 @@ jobs:
5555
fi
5656
5757
- name: Set up Python
58-
uses: actions/setup-python@v5
58+
uses: actions/setup-python@v6
5959
with:
6060
python-version: '3.x'
6161

Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
name: Weekly Branch Tests
2+
3+
on:
4+
schedule:
5+
# Run every Sunday at 02:30 UTC (30 minutes after download test)
6+
- cron: '30 2 * * 0'
7+
workflow_dispatch: # Allow manual triggering
8+
9+
jobs:
10+
weekly-test:
11+
runs-on: ${{ matrix.config.os }}
12+
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/develop'
13+
14+
strategy:
15+
fail-fast: false
16+
matrix:
17+
config:
18+
- { name: 'ubuntu_latest', os: ubuntu-latest }
19+
- { name: 'macos_latest', os: macos-latest }
20+
java:
21+
- { ver: '11', run_nextflow: true, run_coverage: false, nxf_ver: "22.04.5" }
22+
- { ver: '17', run_nextflow: true, run_coverage: true, nxf_ver: latest }
23+
- { ver: '21', run_nextflow: true, run_coverage: false, nxf_ver: latest-edge }
24+
branch:
25+
- main
26+
- develop_0_9
27+
28+
steps:
29+
- name: Checkout ${{ matrix.branch }} branch
30+
uses: actions/checkout@v5
31+
with:
32+
ref: ${{ matrix.branch }}
33+
34+
- uses: viash-io/viash-actions/project/update-docker-engine@v6
35+
if: runner.os == 'Linux'
36+
37+
- name: Set up R
38+
uses: r-lib/actions/setup-r@v2
39+
with:
40+
use-public-rspm: true
41+
42+
- name: Set up R dependencies
43+
uses: r-lib/actions/setup-r-dependencies@v2
44+
with:
45+
packages: |
46+
processx
47+
testthat
48+
49+
- name: Set up java
50+
uses: actions/setup-java@v5
51+
with:
52+
distribution: temurin
53+
java-version: ${{ matrix.java.ver }}
54+
55+
- name: Set up sbt
56+
uses: sbt/setup-sbt@v1
57+
58+
- name: Set up Scala
59+
run: |
60+
if [[ "${{ matrix.config.os }}" =~ ^macos.*$ ]]; then
61+
brew install scala
62+
else
63+
sudo apt-get update
64+
sudo apt-get install -y scala
65+
fi
66+
67+
- name: Set up Python
68+
uses: actions/setup-python@v6
69+
with:
70+
python-version: '3.x'
71+
72+
- name: Set up Nextflow
73+
if: ${{ runner.os == 'Linux' && matrix.java.run_nextflow }}
74+
uses: nf-core/setup-nextflow@v2
75+
with:
76+
version: ${{ matrix.java.nxf_ver }}
77+
78+
- name: Run tests
79+
run: |
80+
if [[ "${{ matrix.config.name }}" =~ ^ubuntu.*$ ]] && [[ "${{ matrix.java.run_coverage }}" == "true" ]]; then
81+
# only run coverage on main runner
82+
sbt clean coverage test coverageReport
83+
elif [[ "${{ matrix.config.name }}" =~ ^ubuntu.*$ ]] && [[ "${{ matrix.java.run_nextflow }}" == "false" ]]; then
84+
sbt 'testOnly -- -l io.viash.NextflowTest'
85+
elif [[ "${{ matrix.config.os }}" =~ ^macos.*$ ]]; then
86+
# macOS on github actions does not have Docker, so skip those
87+
sbt 'testOnly -- -l io.viash.DockerTest -l io.viash.NextflowTest'
88+
else
89+
sbt test
90+
fi
91+
92+
- name: Upload coverage on success
93+
if: ${{ matrix.java.run_coverage }}
94+
run: bash <(curl -s https://codecov.io/bash)
95+
96+
- name: Upload check results on fail
97+
if: failure()
98+
uses: actions/upload-artifact@master
99+
with:
100+
name: ${{ matrix.config.name }}_${{ matrix.branch }}_${{ matrix.java.ver }}_results
101+
path: check
102+
103+
- name: Notify on failure
104+
if: failure()
105+
run: |
106+
curl -X POST \
107+
-H 'Content-Type: application/json' \
108+
-d '{
109+
"text": "🚨 *Weekly Tests Failed*\n\n• **Branch**: ${{ matrix.branch }}\n• **OS**: ${{ matrix.config.name }}\n• **Java**: ${{ matrix.java.ver }}\n• **Repository**: ${{ github.repository }}\n• **Run**: <${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|View Logs>"
110+
}' \
111+
"${{ secrets.GOOGLE_CHAT_WEBHOOK_URL }}"
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: Weekly Download Test
2+
3+
on:
4+
schedule:
5+
# Run every Sunday at 02:00 UTC
6+
- cron: '0 2 * * 0'
7+
workflow_dispatch: # Allow manual triggering
8+
9+
jobs:
10+
download-install-test:
11+
runs-on: ${{ matrix.os }}
12+
strategy:
13+
fail-fast: false
14+
matrix:
15+
os: [ubuntu-latest, macos-latest]
16+
17+
steps:
18+
- name: Test viash download and installation
19+
run: |
20+
echo "Testing viash download from https://dl.viash.io"
21+
22+
# Download viash
23+
if [[ "${{ matrix.os }}" =~ ^ubuntu.*$ ]]; then
24+
curl -fsSL https://dl.viash.io | bash
25+
elif [[ "${{ matrix.os }}" =~ ^macos.*$ ]]; then
26+
curl -fsSL https://dl.viash.io | bash
27+
fi
28+
29+
# Verify installation
30+
if command -v viash &> /dev/null; then
31+
echo "✅ viash command is available"
32+
viash --version
33+
echo "✅ viash version check successful"
34+
else
35+
echo "❌ viash command not found after installation"
36+
exit 1
37+
fi
38+
39+
# Test basic functionality
40+
echo "Testing basic viash functionality..."
41+
viash --help > /dev/null
42+
echo "✅ viash help command works"
43+
44+
- name: Notify download test failure
45+
if: failure()
46+
run: |
47+
curl -X POST \
48+
-H 'Content-Type: application/json' \
49+
-d '{
50+
"text": "🚨 *Viash Download Test Failed*\n\n• **OS**: ${{ matrix.os }}\n• **Issue**: Failed to download/install viash from https://dl.viash.io\n• **Repository**: ${{ github.repository }}\n• **Run**: <${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|View Logs>"
51+
}' \
52+
"${{ secrets.GOOGLE_CHAT_WEBHOOK_URL }}"

0 commit comments

Comments
 (0)