-
Notifications
You must be signed in to change notification settings - Fork 7
101 lines (84 loc) · 2.82 KB
/
sbt_test.yml
File metadata and controls
101 lines (84 loc) · 2.82 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
name: Scala CI
on:
pull_request:
push:
branches:
- main
- 'develop_**'
jobs:
scala-ci:
runs-on: ${{ matrix.config.os }}
if: "!contains(github.event.head_commit.message, 'ci skip')"
strategy:
fail-fast: false
matrix:
config:
- { name: 'ubuntu_latest', os: ubuntu-latest }
- { name: 'macos_latest', os: macos-latest }
java:
- { ver: '11', run_nextflow: true, run_coverage: false, nxf_ver: "22.04.5" }
- { ver: '17', run_nextflow: true, run_coverage: true, nxf_ver: latest }
- { ver: '21', run_nextflow: true, run_coverage: false, nxf_ver: latest-edge }
steps:
- uses: actions/checkout@v6
- uses: viash-io/viash-actions/project/update-docker-engine@v6
if: runner.os == 'Linux'
- name: Set up R
uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true
- name: Set up R dependencies
uses: r-lib/actions/setup-r-dependencies@v2
with:
packages: |
processx
testthat
- name: Set up java
uses: actions/setup-java@v5
with:
distribution: temurin
java-version: ${{ matrix.java.ver }}
# - name: Set up sbt
# uses: sbt/setup-sbt@v1
- name: Set up Scala (via Coursier)
uses: coursier/setup-action@v2
with:
apps: sbt scala
- name: Set up .NET SDK
if: ${{ runner.os == 'Linux' }}
uses: actions/setup-dotnet@v4
with:
dotnet-version: '9.0.x'
- name: Set up dotnet-script
if: ${{ runner.os == 'Linux' }}
run: dotnet tool install -g dotnet-script
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: '3.x'
- name: Set up Nextflow
if: ${{ runner.os == 'Linux' && matrix.java.run_nextflow }}
uses: nf-core/setup-nextflow@v2
with:
version: ${{ matrix.java.nxf_ver }}
- name: Run tests
run: |
if [[ "${{ matrix.config.name }}" =~ ^ubuntu.*$ ]] && [[ "${{ matrix.java.run_coverage }}" == "true" ]]; then
# only run coverage on main runner
sbt clean coverage test coverageReport
elif [[ "${{ matrix.config.name }}" =~ ^ubuntu.*$ ]] && [[ "${{ matrix.java.run_nextflow }}" == "false" ]]; then
sbt 'testOnly -- -l io.viash.NextflowTest'
elif [[ "${{ matrix.config.os }}" =~ ^macos.*$ ]]; then
# macOS on github actions does not have Docker, so skip those
sbt 'testOnly -- -l io.viash.DockerTest -l io.viash.NextflowTest'
else
sbt test
fi
- name: Upload coverage on success
run: bash <(curl -s https://codecov.io/bash)
- name: Upload check results on fail
if: failure()
uses: actions/upload-artifact@v6
with:
name: ${{ matrix.config.name }}_results
path: check