Skip to content

Update latest pekko-http to bring in cors #335

Update latest pekko-http to bring in cors

Update latest pekko-http to bring in cors #335

Workflow file for this run

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:
check-code-style:
name: Checks
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
# we don't know what commit the last tag was it's safer to get entire repo so previousStableVersion resolves
fetch-depth: 0
- name: Setup Java 11
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 11
- name: Cache Coursier cache
uses: coursier/cache-action@v6
#- name: FOSSA policy check
# if: ${{ github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == 'apache/incubator-pekko-grpc' }}
# 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}}"
- name: Binary-compatibility check
run: |-
cp .jvmopts-ci .jvmopts
sbt grpcVersionSyncCheck googleProtobufVersionSyncCheck +mimaReportBinaryIssues
compile-benchmarks:
name: Compile Benchmarks
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
# we don't know what commit the last tag was it's safer to get entire repo so previousStableVersion resolves
fetch-depth: 0
- name: Setup Java 8
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 11
- name: Cache Coursier cache
uses: coursier/cache-action@v6
- name: Compile benchmarks
run: |-
cd benchmark-java
sbt test:compile
compile-and-test:
name: Compile and test
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
SCALA_VERSION: [2.12, 2.13, 3.3]
JAVA_VERSION: [8, 11]
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup Java ${{ matrix.JAVA_VERSION }}
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: ${{ matrix.JAVA_VERSION }}
- name: Cache Coursier cache
uses: coursier/cache-action@v6
- name: Compile and test for JDK ${{ matrix.JAVA_VERSION }}, Scala ${{ matrix.SCALA_VERSION }}
run: sbt ++${{ matrix.SCALA_VERSION }}.* test
test-sbt:
name: sbt scripted tests
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- test-set: gen-scala-server
scala-version: 2.12
- test-set: gen-java
scala-version: 2.12
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup Java 8
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 8
- name: Cache Coursier cache
uses: coursier/cache-action@v6
- name: Scripted ${{ matrix.test-set }}
run: cp .jvmopts-ci .jvmopts && sbt ++${{ matrix.scala-version }}.* "sbt-plugin/scripted ${{ matrix.test-set }}/*"
test-gradle:
name: Gradle tests
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup Java 8
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 8
- name: Cache Coursier cache
uses: coursier/cache-action@v6
- name: Gather version
run: |-
echo `git describe --tags | sed -e "s/v\(.*\)-\([0-9][0-9]*\).*/\\1-\\2-/"``git rev-parse HEAD | head -c8`-SNAPSHOT > ~/.version
cat ~/.version
- name: Cache local Gradle repository
uses: actions/cache@v3
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('plugin-tester-*/*.gradle*') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Publish artifacts locally
run: |-
cp .jvmopts-ci .jvmopts
sbt codegen/publishM2 scalapb-protoc-plugin/publishM2 +runtime/publishM2
cd gradle-plugin
./gradlew clean publishToMavenLocal --console=plain --info --stacktrace
find ~/.m2 | grep gradle
- name: Test Gradle Java ${{ matrix.SCALA_VERSION }}
run: |-
cd plugin-tester-java
./gradlew clean test --console=plain --info --stacktrace -Dpekko.grpc.project.version=$(cat ~/.version | sed -e s/-SNAPSHOT//)
- name: Test Gradle Scala ${{ matrix.SCALA_VERSION }}
run: |-
cd plugin-tester-scala
./gradlew clean test --console=plain --info --stacktrace -Dpekko.grpc.project.version=$(cat ~/.version | sed -e s/-SNAPSHOT//)
- name: Stop Gradle Daemon
# as suggested in https://github.com/actions/cache/blob/main/examples.md#java---gradle
if: always()
run: cd plugin-tester-scala; ./gradlew --stop
test-maven:
name: Maven tests
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup Java 8
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 8
- name: Cache Coursier cache
uses: coursier/cache-action@v6
- name: Gather version
run: |-
echo `git describe --tags | sed -e "s/v\(.*\)-\([0-9][0-9]*\).*/\\1-\\2-/"``git rev-parse HEAD | head -c8`-SNAPSHOT > ~/.version
cat ~/.version
- name: Cache local Maven repository
uses: actions/cache@v3
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('plugin-tester-*/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Publish artifacts locally
run: |-
cp .jvmopts-ci .jvmopts
sbt codegen/publishM2 scalapb-protoc-plugin/publishM2 +runtime/publishM2 maven-plugin/publishM2
- name: Test Maven Java
run: |-
cd plugin-tester-java
mvn -Dpekko.grpc.project.version=`cat ~/.version` pekko-grpc:generate compile
- name: Test Maven Scala
run: |-
cd plugin-tester-scala
mvn -Dpekko.grpc.project.version=`cat ~/.version` pekko-grpc:generate scala:compile
test-docs:
name: Docs
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup Java 11
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 11
- name: Cache Coursier cache
uses: coursier/cache-action@v6
- name: Test Maven Java
run: |-
cp .jvmopts-ci .jvmopts
sbt paradox