Multi node test #53
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: Multi node test | |
on: | |
schedule: | |
- cron: '0 2 * * 1,3,5' | |
workflow_dispatch: | |
permissions: | |
contents: 'read' | |
# needed for google-github-actions 1.0.1 | |
id-token: 'write' | |
env: | |
USE_GKE_GCLOUD_AUTH_PLUGIN: True | |
concurrency: | |
# Only run once for latest commit per ref and cancel other (previous) runs. | |
group: ci-multi-node-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
run-multi-node-tests: | |
name: Multi Node Test | |
runs-on: ubuntu-22.04 | |
if: github.repository == 'akka/akka' | |
steps: | |
- name: Checkout | |
# https://github.com/actions/checkout/releases | |
# v4.1.1 | |
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 | |
with: | |
fetch-depth: 0 | |
- name: Install Kubectl | |
run: | | |
sudo snap install kubectl --classic | |
# https://github.com/google-github-actions/auth/releases | |
# v1.0.0 | |
- name: Authenticate to Google Cloud | |
uses: google-github-actions/auth@ef5d53e30bbcd8d0836f4288f5e50ff3e086997d | |
with: | |
project_id: ${{ secrets.GKE_PROJECT }} | |
credentials_json: ${{ secrets.GKE_SA_KEY }} | |
# https://github.com/google-github-actions/setup-gcloud/releases | |
# v1.0.1 | |
- name: Install gcloud cli | |
uses: google-github-actions/setup-gcloud@d51b5346f85640ec2aa2fa057354d2b82c2fcbce | |
with: | |
project_id: ${{ secrets.GKE_PROJECT }} | |
- name: Create the cluster | |
run: |- | |
gcloud components install gke-gcloud-auth-plugin | |
gcloud config set compute/region us-central1 | |
gcloud config set compute/zone us-central1-c | |
./kubernetes/create-cluster-gke.sh "akka-multi-node-${GITHUB_RUN_ID}" | |
- name: Setup Pods | |
run: | | |
# Start 10 pods. At most 10 MultiJvmNode (akka.cluster.StressSpec is currently disabled). | |
./kubernetes/setup.sh 10 multi-node-test.hosts tcp | |
- name: Cache Coursier cache | |
# https://github.com/coursier/cache-action/releases | |
# v6.4.5 | |
uses: coursier/cache-action@1ff273bff02a8787bc9f1877d347948af647956d | |
- name: Set up JDK 17 | |
# https://github.com/coursier/setup-action/releases | |
# v1.3.5 | |
uses: coursier/setup-action@7bde40eee928896f074dbb76d22dd772eed5c65f | |
with: | |
jvm: temurin:1.17 | |
- name: Multi node test | |
run: | | |
cat multi-node-test.hosts | |
cp .jvmopts-ci .jvmopts | |
sbt \ | |
-Dakka.test.timefactor=2 \ | |
-Dakka.actor.testkit.typed.timefactor=2 \ | |
-Dakka.test.tags.exclude=gh-exclude,timing \ | |
-Dakka.cluster.assert=on \ | |
-Dsbt.override.build.repos=false \ | |
-Dakka.test.multi-node=true \ | |
-Dakka.test.multi-node.targetDirName=${PWD}/target/${{ github.run_id }} \ | |
-Dakka.test.multi-node.java=${JAVA_HOME}/bin/java \ | |
-Dmultinode.XX:MetaspaceSize=128M \ | |
-Dmultinode.Xms512M \ | |
-Dmultinode.Xmx512M \ | |
-Dmultinode.Xlog:gc \ | |
-Dmultinode.XX:+AlwaysActAsServerClassMachine \ | |
multiNodeTest | |
- name: Email on failure | |
if: ${{ failure() }} | |
uses: dawidd6/action-send-mail@6063705cefe50cb915fc53bb06d4049cae2953b2 | |
with: | |
server_address: smtp.gmail.com | |
server_port: 465 | |
secure: true | |
username: ${{secrets.MAIL_USERNAME}} | |
password: ${{secrets.MAIL_PASSWORD}} | |
subject: "Failed: ${{ github.workflow }} / ${{ github.job }}" | |
to: ${{secrets.MAIL_SEND_TO}} | |
from: Akka CI | |
body: | | |
Job ${{ github.job }} in workflow ${{ github.workflow }} of ${{github.repository}} failed! | |
https://github.com/${{github.repository}}/actions/runs/${{github.run_id}} | |
- name: Cleanup the environment | |
if: ${{ always() }} | |
shell: bash {0} | |
run: | | |
gcloud container clusters delete "akka-multi-node-${GITHUB_RUN_ID}" --quiet |