-
Notifications
You must be signed in to change notification settings - Fork 160
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
release to sonatype using GH Actions #889
Merged
Merged
Changes from 16 commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
34a8882
release to sonatype using GH Actions
octonato bb72f84
move basic checks to GH Actions
octonato 88e04d0
added unit tests workflow
octonato ce46964
check headers
octonato d0fbbef
remove unit tests from travis job
octonato 8abb896
try this hack
octonato ab8db7f
integration tests with minikube
octonato ca90ff3
integration tests for kube lease
octonato c6cf66f
fix name
octonato 6997503
also enable on release branch
octonato b10de52
run tests everyday at 2am
octonato 60634f5
integration tests with maven
octonato 1d8c779
Fix CI release
patriknw f230b8d
add a timeout to the hanging step
raboof 7e01dcd
Add more logging
raboof 2ccbcf8
Add missing '&'
raboof eef1b13
Scala 2.13.5 everywhere
raboof File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
name: Basic checks | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- master | ||
- release-* | ||
tags-ignore: [ v.* ] | ||
|
||
jobs: | ||
check-code-style: | ||
name: Check Code Style | ||
runs-on: ubuntu-18.04 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
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: Checkout GitHub merge | ||
if: github.event.pull_request | ||
run: |- | ||
git fetch origin pull/${{ github.event.pull_request.number }}/merge:scratch | ||
git checkout scratch | ||
|
||
- name: Set up JDK 11 | ||
uses: olafurpg/setup-scala@v10 | ||
with: | ||
java-version: [email protected] | ||
|
||
- name: Cache Coursier cache | ||
uses: coursier/cache-action@v5 | ||
|
||
- name: Code style check, compilation and binary-compatibility check | ||
run: sbt "scalafmtCheckAll;headerCheckAll;+IntegrationTest/compile;mimaReportBinaryIssues" | ||
|
||
check-docs: | ||
name: Check Docs | ||
runs-on: ubuntu-18.04 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Checkout GitHub merge | ||
if: github.event.pull_request | ||
run: |- | ||
git fetch origin pull/${{ github.event.pull_request.number }}/merge:scratch | ||
git checkout scratch | ||
|
||
- name: Set up JDK 11 | ||
uses: olafurpg/setup-scala@v10 | ||
with: | ||
java-version: [email protected] | ||
|
||
- name: Cache Coursier cache | ||
uses: coursier/cache-action@v5 | ||
|
||
- name: Create all API docs for artifacts/website and all reference docs | ||
run: sbt "unidoc; docs/paradox" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
name: Integration test for Kubernetes API | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- master | ||
- release-* | ||
tags-ignore: [ v.* ] | ||
schedule: | ||
- cron: '0 2 * * *' # every day 2am | ||
|
||
jobs: | ||
integration-test: | ||
name: Integration Tests for Kubernetes API | ||
runs-on: ubuntu-18.04 | ||
strategy: | ||
fail-fast: false | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Checkout GitHub merge | ||
if: github.event.pull_request | ||
run: |- | ||
git fetch origin pull/${{ github.event.pull_request.number }}/merge:scratch | ||
git checkout scratch | ||
|
||
- name: Set up JDK [email protected] | ||
uses: olafurpg/setup-scala@v10 | ||
with: | ||
java-version: [email protected] | ||
|
||
- name: Cache Coursier cache | ||
uses: coursier/cache-action@v5 | ||
|
||
- name: Start docker | ||
run: |- | ||
./scripts/setup-minikube-for-linux.sh | ||
./integration-test/kubernetes-api/test.sh | ||
|
||
- name: Print logs on failure | ||
if: ${{ failure() }} | ||
run: find . -name "*.log" -exec ./scripts/cat-log.sh {} \; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
name: Integration test for Kubernetes DNS | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- master | ||
- release-* | ||
tags-ignore: [ v.* ] | ||
schedule: | ||
- cron: '0 2 * * *' # every day 2am | ||
|
||
jobs: | ||
integration-test: | ||
name: Integration Tests for Kubernetes DNS | ||
runs-on: ubuntu-18.04 | ||
strategy: | ||
fail-fast: false | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Checkout GitHub merge | ||
if: github.event.pull_request | ||
run: |- | ||
git fetch origin pull/${{ github.event.pull_request.number }}/merge:scratch | ||
git checkout scratch | ||
|
||
- name: Set up JDK [email protected] | ||
uses: olafurpg/setup-scala@v10 | ||
with: | ||
java-version: [email protected] | ||
|
||
- name: Cache Coursier cache | ||
uses: coursier/cache-action@v5 | ||
|
||
- name: Start docker | ||
run: |- | ||
./scripts/setup-minikube-for-linux.sh | ||
./integration-test/kubernetes-dns/test.sh | ||
|
||
- name: Print logs on failure | ||
if: ${{ failure() }} | ||
run: find . -name "*.log" -exec ./scripts/cat-log.sh {} \; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
name: Integration test for Kubernetes Lease | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- master | ||
- release-* | ||
tags-ignore: [ v.* ] | ||
schedule: | ||
- cron: '0 2 * * *' # every day 2am | ||
|
||
jobs: | ||
integration-test: | ||
name: Integration test for Kubernetes Lease | ||
runs-on: ubuntu-18.04 | ||
strategy: | ||
fail-fast: false | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Checkout GitHub merge | ||
if: github.event.pull_request | ||
run: |- | ||
git fetch origin pull/${{ github.event.pull_request.number }}/merge:scratch | ||
git checkout scratch | ||
|
||
- name: Set up JDK [email protected] | ||
uses: olafurpg/setup-scala@v10 | ||
with: | ||
java-version: [email protected] | ||
|
||
- name: Cache Coursier cache | ||
uses: coursier/cache-action@v5 | ||
|
||
- name: Start docker | ||
timeout-minutes: 15 | ||
run: |- | ||
echo 'Starting minikube' | ||
./scripts/setup-minikube-for-linux.sh | ||
echo 'Creating namespace' | ||
kubectl create namespace lease | ||
echo 'Creating resources' | ||
kubectl apply -f ./lease-kubernetes/lease.yml | ||
echo 'Adding proxy port' | ||
kubectl proxy --port=8080 & | ||
echo 'Running tests' | ||
sbt ";lease-kubernetes/it:test" | ||
./lease-kubernetes-int-test/minikube-test.sh | ||
|
||
- name: Print logs on failure | ||
if: ${{ failure() }} | ||
run: find . -name "*.log" -exec ./scripts/cat-log.sh {} \; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
name: Integration test for Kubernetes API with Maven | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- master | ||
- release-* | ||
tags-ignore: [ v.* ] | ||
# Different than its sibilings, we don't configure this workflow to run as a cron job. | ||
# The cron build compiles against Akka 2.6 and Akka HTTP 10.2, but the Maven example uses 2.5 and 10.1 | ||
# see https://github.com/akka/akka-management/issues/744 | ||
|
||
jobs: | ||
integration-test: | ||
name: Integration Tests for Kubernetes API with Maven | ||
runs-on: ubuntu-18.04 | ||
strategy: | ||
fail-fast: false | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Checkout GitHub merge | ||
if: github.event.pull_request | ||
run: |- | ||
git fetch origin pull/${{ github.event.pull_request.number }}/merge:scratch | ||
git checkout scratch | ||
|
||
- name: Set up JDK [email protected] | ||
uses: olafurpg/setup-scala@v10 | ||
with: | ||
java-version: [email protected] | ||
|
||
- name: Cache Coursier cache | ||
uses: coursier/cache-action@v5 | ||
|
||
- name: Start docker | ||
run: |- | ||
./scripts/setup-minikube-for-linux.sh | ||
./integration-test/kubernetes-api-java/test.sh | ||
|
||
- name: Print logs on failure | ||
if: ${{ failure() }} | ||
run: find . -name "*.log" -exec ./scripts/cat-log.sh {} \; |
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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
- release-* | ||
tags: ["*"] | ||
|
||
jobs: | ||
release: | ||
# runs on main repo only | ||
if: github.repository == 'akka/akka-management' | ||
name: Release | ||
# the release environment provides access to secrets required in the release process | ||
# https://github.com/akka/akka-management/settings/environments | ||
environment: release | ||
runs-on: ubuntu-18.04 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
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: Checkout GitHub merge | ||
if: github.event.pull_request | ||
run: |- | ||
git fetch origin pull/${{ github.event.pull_request.number }}/merge:scratch | ||
git checkout scratch | ||
|
||
- name: Setup Scala with JDK 8 | ||
uses: olafurpg/setup-scala@v10 | ||
|
||
- name: Cache Coursier cache | ||
uses: coursier/cache-action@v5 | ||
|
||
- name: Whitesource check policies and update | ||
env: | ||
WHITESOURCE_PASSWORD: ${{ secrets.WHITESOURCE_PASSWORD }} | ||
run: sbt ";whitesourceCheckPolicies ;whitesourceUpdate" | ||
|
||
- name: Publish artifacts for all Scala versions | ||
env: | ||
PGP_SECRET: ${{ secrets.PGP_SECRET }} | ||
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} | ||
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }} | ||
run: sbt ci-release | ||
|
||
- name: Publish API and reference documentation | ||
env: | ||
GUSTAV_KEY: ${{ secrets.GUSTAV_KEY }} | ||
GUSTAV_PASSPHRASE: ${{ secrets.GUSTAV_PASSPHRASE }} | ||
run: |+ | ||
eval "$(ssh-agent -s)" | ||
echo $GUSTAV_KEY | base64 -di > .github/id_rsa | ||
chmod 600 .github/id_rsa | ||
ssh-keygen -p -P "$GUSTAV_PASSPHRASE" -N "" -f .github/id_rsa | ||
ssh-add .github/id_rsa | ||
sbt "++2.13.4 docs/publishRsync" | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
name: Unit Tests | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- master | ||
- release-* | ||
tags-ignore: [ v.* ] | ||
schedule: | ||
- cron: '0 2 * * *' # every day 2am | ||
|
||
jobs: | ||
test: | ||
name: Build and Test | ||
runs-on: ubuntu-18.04 | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
include: | ||
- { java-version: [email protected], scala-version: 2.12.13, sbt-opts: '' } | ||
- { java-version: [email protected], scala-version: 2.12.13, sbt-opts: '-J-XX:+UnlockExperimentalVMOptions -J-XX:+UseJVMCICompiler' } | ||
- { java-version: [email protected], scala-version: 2.13.5, sbt-opts: '' } | ||
- { java-version: [email protected], scala-version: 2.13.5, sbt-opts: '-J-XX:+UnlockExperimentalVMOptions -J-XX:+UseJVMCICompiler' } | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Checkout GitHub merge | ||
if: github.event.pull_request | ||
run: |- | ||
git fetch origin pull/${{ github.event.pull_request.number }}/merge:scratch | ||
git checkout scratch | ||
|
||
- name: Setup JDK ${{ matrix.java-version }} | ||
uses: olafurpg/setup-scala@v10 | ||
with: | ||
java-version: ${{ matrix.java-version }} | ||
|
||
- name: Cache Coursier cache | ||
uses: coursier/cache-action@v5 | ||
|
||
# hack to solve "Cannot assign requested address" issue - https://github.community/t/github-action-and-oserror-errno-99-cannot-assign-requested-address/173973/1 | ||
- name: Add the current IP address, long hostname and short hostname record to /etc/hosts file | ||
run: | | ||
echo -e "$(ip addr show eth0 | grep "inet\b" | awk '{print $2}' | cut -d/ -f1)\t$(hostname -f) $(hostname -s)" | sudo tee -a /etc/hosts | ||
|
||
- name: Run tests with Scala ${{ matrix.scala-version }} and Java ${{ matrix.java-version }} | ||
run: sbt "++${{ matrix.scala-version }} test" ${{ matrix.sbt-opts }} | ||
|
||
- name: Print logs on failure | ||
if: ${{ failure() }} | ||
run: find . -name "*.log" -exec ./scripts/cat-log.sh {} \; |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Other workflows on this PR use 2.13.5 (e.g. https://github.com/akka/akka-management/pull/889/files#diff-cd0effce06f425599e96952f4d5f684641a683f46d9909e7c74a9f8b2f03ccd3R23).