Day 1 improvements: unzip and map+sum to foldMap #8
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
name: CI | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
concurrency: | |
group: ${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
shellcheck: | |
runs-on: ubuntu-latest | |
timeout-minutes: 1 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Run ShellCheck | |
uses: ludeeus/action-shellcheck@2.0.0 | |
env: | |
SHELLCHECK_OPTS: --severity style --enable all --exclude SC2312 --shell bash | |
with: | |
check_together: yes | |
scandir: "./scripts" | |
test: | |
runs-on: ubuntu-latest | |
timeout-minutes: 3 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Get JDK version | |
run: | | |
source scripts/get_java_version.sh | |
echo "JAVA_VERSION=${JAVA_VERSION}" >> "${GITHUB_ENV}" | |
- name: Set up JDK ${{ env.JAVA_VERSION }} | |
uses: actions/setup-java@v4 | |
with: | |
java-version: ${{ env.JAVA_VERSION }} | |
distribution: "temurin" | |
- uses: sbt/setup-sbt@v1 | |
- name: Run tests | |
run: sbt test | |
lint: | |
runs-on: ubuntu-latest | |
timeout-minutes: 1 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Get JDK version | |
run: | | |
source scripts/get_java_version.sh | |
echo "JAVA_VERSION=${JAVA_VERSION}" >> "${GITHUB_ENV}" | |
- name: Set up JDK ${{ env.JAVA_VERSION }} | |
uses: actions/setup-java@v4 | |
with: | |
java-version: ${{ env.JAVA_VERSION }} | |
distribution: "temurin" | |
- uses: sbt/setup-sbt@v1 | |
- name: Check | |
run: sbt scalafmtSbtCheck scalafmtCheck Test/scalafmtCheck | |
build-dockerfile: | |
runs-on: ubuntu-latest | |
timeout-minutes: 3 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Build Dockerfile | |
run: docker build --file "./Dockerfile" "." |