Skip to content

Bump actions/setup-node from 5 to 6 (#1030) #1809

Bump actions/setup-node from 5 to 6 (#1030)

Bump actions/setup-node from 5 to 6 (#1030) #1809

Workflow file for this run

name: CI
on:
push:
branches:
- main
pull_request:
jobs:
checks:
name: Scalafmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: actions/setup-java@v5
with:
java-version: 11
distribution: adopt
- run: ./bin/scalafmt --test
docs:
name: Website
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
with:
fetch-depth: 0
- uses: actions/setup-node@v6
with:
node-version: "16"
- uses: actions/setup-java@v5
with:
java-version: 11
distribution: temurin
cache: sbt
- uses: sbt/setup-sbt@v1
- run: sbt '++2.12.20; docs/mdoc'
test-windows:
name: "Windows"
runs-on: windows-latest
steps:
- name: Install LLVM
shell: pwsh
run: |
$retryCount = 3
$retryDelay = 5 # seconds
function InstallLLVM {
Write-Host "Attempting to install LLVM (try $($retryCount + 1 - $global:retryAttempt) of $($retryCount + 1))..."
choco install llvm --version="20.1.4" --allow-downgrade --force
}
# Attempt to install LLVM with retries
for ($global:retryAttempt = 1; $global:retryAttempt -le $retryCount; $global:retryAttempt++) {
try {
InstallLLVM
Write-Host "LLVM installation successful!"
break # Exit the loop if installation is successful
} catch {
Write-Host "Error installing LLVM: $_"
if ($global:retryAttempt -lt $retryCount) {
Write-Host "Retrying in $retryDelay seconds..."
Start-Sleep -Seconds $retryDelay
} else {
Write-Host "Maximum retry attempts reached. Exiting."
exit 1
}
}
}
- name: Add LLVM on Path
shell: pwsh
run: echo "${env:ProgramFiles}\LLVM\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
- name: Assert clang installed and on path
shell: pwsh
run: clang --version
- uses: actions/checkout@v5
- uses: actions/setup-node@v6
with:
node-version: "16"
- uses: actions/setup-java@v5
with:
java-version: 11
distribution: temurin
cache: sbt
- uses: sbt/setup-sbt@v1
- run: sbt '++2.13.17 test'
shell: bash
test:
name: ${{ matrix.command }} ${{ matrix.java }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
java: [11, 17]
command:
# Test legacy Scala versions, where reporting API changed
- "'++2.12.12! testAllNonNative'" # compiler version too old for Scala Native
- "'++2.12.20 test'"
- "'++2.13.17 test'"
# Minimal supported version
- "'++3.3.7 test'"
- "'++3.7.3 plugin/test'"
- "'++2.12.20 scripted'"
- "'++3.7.3 scripted'"
steps:
- uses: actions/checkout@v5
- uses: actions/setup-node@v6
with:
node-version: "16"
- uses: actions/setup-java@v5
with:
java-version: ${{ matrix.java }}
distribution: temurin
cache: sbt
- uses: sbt/setup-sbt@v1
- run: sbt ${{ matrix.command }}