exclude act steps when on github #43
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This workflow uses actions that are not certified by GitHub. | |
# They are provided by a third-party and are governed by | |
# separate terms of service, privacy policy, and support | |
# documentation. | |
name: Scala CI | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
permissions: | |
contents: write # this permission is needed to submit the dependency graph | |
jobs: | |
linux-build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v4 | |
with: | |
java-version: '17' | |
distribution: 'temurin' | |
cache: 'sbt' | |
- run: curl -fL https://github.com/coursier/coursier/releases/latest/download/cs-x86_64-pc-linux.gz | gzip -d > cs && chmod +x cs && ./cs setup --yes --install-dir ~/.local/bin --apps sbt | |
if: ${{ env.ACT }} | |
- run: echo "$HOME/.local/bin" >> $GITHUB_PATH | |
if: ${{ env.ACT }} | |
- name: Run tests | |
run: sbt test | |
# Optional: This step uploads information to the GitHub dependency graph and unblocking Dependabot alerts for the repository | |
- name: Upload dependency graph | |
if: ${{ github.token != null}} | |
uses: scalacenter/sbt-dependency-submission@v2 | |
with: | |
configs-ignore: scala-tool scala-doc-tool | |
windows-build: | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '17' | |
distribution: 'temurin' | |
cache: 'sbt' | |
- name: Run tests | |
run: sbt test |