-
Notifications
You must be signed in to change notification settings - Fork 0
34 lines (30 loc) · 1011 Bytes
/
test.yml
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
name: Possible Scala CLI Issue
on:
workflow_dispatch:
jobs:
works:
name: Show that Scala CLI works with JVM it downloads
runs-on: ubuntu-22.04
steps:
- uses: VirtusLab/scala-cli-setup@v1
- run: echo 'println("Hello")' | scala-cli _.sc
fails:
name: Show that Scala CLI fails with System JVM
runs-on: ubuntu-22.04
steps:
- name: Setup Java
run: echo "JAVA_HOME=${JAVA_HOME_17_X64}" >> "$GITHUB_ENV"
- uses: VirtusLab/scala-cli-setup@v1
with:
jvm: '' # Deliberately empty to avoid downloading JVM
- run: echo 'println("Hello")' | scala-cli _.sc
workaround:
name: Show workaround with --server=false
runs-on: ubuntu-22.04
steps:
- name: Setup Java
run: echo "JAVA_HOME=${JAVA_HOME_17_X64}" >> "$GITHUB_ENV"
- uses: VirtusLab/scala-cli-setup@v1
with:
jvm: '' # Deliberately empty to avoid downloading JVM
- run: echo 'println("Hello")' | scala-cli --server=false _.sc