Skip to content

Bump actions/cache from 5.0.1 to 5.0.2 #2198

Bump actions/cache from 5.0.1 to 5.0.2

Bump actions/cache from 5.0.1 to 5.0.2 #2198

# Licensed to the Apache Software Foundation (ASF) under one or more
# license agreements; and to You under the Apache License, version 2.0:
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# This file is part of the Apache Pekko project, which was derived from Akka.
#
name: Validate and test
on:
pull_request:
push:
branches: [ main ]
tags-ignore: [ v* ]
concurrency:
# Only run once for latest commit per ref and cancel other (previous) runs.
group: ci-${{ github.ref }}
cancel-in-progress: true
jobs:
formatting-check:
name: Checks
runs-on: ubuntu-latest
if: github.repository == 'apache/pekko-http'
steps:
- name: Checkout
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
fetch-depth: 0
fetch-tags: true
- name: Set up Scala on JDK 17
uses: actions/setup-java@f2beeb24e141e01a676f977032f5a29d81c9e27e # v5.1.0
with:
distribution: temurin
java-version: 17
- name: Install sbt
uses: sbt/setup-sbt@a627500d27445f8c5021755a439829b6e78e3358 # v1.1.15
- name: Cache Coursier cache
uses: coursier/cache-action@bebeeb0e6f48ebad66d3783946588ecf43114433 # v7.0.0
- name: Cache Build Target
uses: actions/cache@8b402f58fbc84540c8b491a91e594a4576fec3d7 # v5.0.2
with:
path: project/**/target
key: build-target-${{ hashFiles('**/*.sbt', 'project/build.properties', 'project/**/*.scala') }}
- name: Check code is formatted
run: sbt javafmtCheckAll
- name: Check for missing formatting
run: git diff --exit-code --color
#- name: FOSSA policy check
# if: ${{ github.event_name == 'push' || github.event.pull_request.head.repo.full_name == 'apache/pekko-http' }}
# run: |-
# curl -H 'Cache-Control: no-cache' https://raw.githubusercontent.com/fossas/spectrometer/master/install.sh | bash
# fossa analyze && fossa test
# env:
# FOSSA_API_KEY: "${{secrets.FOSSA_API_KEY}}"
compile-and-test:
name: Compile and test
runs-on: ubuntu-latest
if: github.repository == 'apache/pekko-http'
strategy:
fail-fast: false
matrix:
SCALA_VERSION: [2.13, 3.3]
JDK: [17]
steps:
- name: Checkout
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
fetch-depth: 0
fetch-tags: true
- name: Set up JDK ${{ matrix.JDK }}
uses: actions/setup-java@f2beeb24e141e01a676f977032f5a29d81c9e27e # v5.1.0
with:
distribution: temurin
java-version: ${{ matrix.JDK }}
- name: Install sbt
uses: sbt/setup-sbt@a627500d27445f8c5021755a439829b6e78e3358 # v1.1.15
- name: Cache Coursier cache
uses: coursier/cache-action@bebeeb0e6f48ebad66d3783946588ecf43114433 # v7.0.0
- name: Cache Build Target
uses: actions/cache@8b402f58fbc84540c8b491a91e594a4576fec3d7 # v5.0.2
with:
path: project/**/target
key: build-target-${{ hashFiles('**/*.sbt', 'project/build.properties', 'project/**/*.scala') }}
- name: Enable jvm-opts
run: cp .jvmopts-ci .jvmopts
- name: Compile everything
run: sbt ++${{ matrix.SCALA_VERSION }} Test/compile
# Quick testing for PR validation
- name: Validate pull request for JDK ${{ matrix.JDK }}, Scala ${{ matrix.SCALA_VERSION }}
if: ${{ github.event_name == 'pull_request' }}
run: sbt -Dpekko.http.parallelExecution=false -Dpekko.test.timefactor=2 ++${{ matrix.SCALA_VERSION }} validatePullRequest
# Full testing for pushes
- name: Run all tests JDK ${{ matrix.JDK }}, Scala ${{ matrix.SCALA_VERSION }}
if: ${{ github.event_name == 'push' }}
run: sbt -Dpekko.http.parallelExecution=false -Dpekko.test.timefactor=2 ++${{ matrix.SCALA_VERSION }} mimaReportBinaryIssues test
- name: Upload test results
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
if: success() || failure() # run this step even if previous step failed
with:
name: test-results-${{ matrix.JDK }}-${{ matrix.SCALA_VERSION }}
path: '**/target/test-reports/*.xml'