Skip to content

Build nightly

Build nightly #112

Workflow file for this run

name: Build nightly
on:
schedule:
- cron: '0 0 * * 1-5'
workflow_dispatch:
jobs:
test:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v3
with:
node-version: 24.11.0
cache: 'npm'
- name: Install
run: npm ci
- name: Unit Test
run: npm test
- name: Build Distribution
run: npm run build
- name: Start 2 Cross-site Infinispan Servers Latest Version
shell: bash
run: |
docker run -d -p 11222:11222 -v ${{ github.workspace }}/scripts/identities.batch:/user-config/identities.batch -v ${{ github.workspace }}/dist:/opt/infinispan/static/console -v ${{ github.workspace }}/scripts/e2eTestsConfigLON.xml:/user-config/e2eTestsConfigLON.xml -e JAVA_OPTS="-Xms1024m -Xmx3072m -XX:MetaspaceSize=1024m -XX:MaxMetaspaceSize=2048m -Dinfinispan.site.name=LON -Djgroups.version.check=false -Djgroups.mcast_port=46656" -e IDENTITIES_BATCH="/user-config/identities.batch" quay.io/infinispan-test/server:main --node-name=infinispan-4-lon-e2e -c "infinispan-xsite.xml" -c "/user-config/e2eTestsConfigLON.xml"
docker run -d -p 31222:11222 -v ${{ github.workspace }}/scripts/identities.batch:/user-config/identities.batch -v ${{ github.workspace }}/dist:/opt/infinispan/static/console -v ${{ github.workspace }}/scripts/e2eTestsConfigNYC.xml:/user-config/e2eTestsConfigNYC.xml -e JAVA_OPTS="-Xms1024m -Xmx3072m -XX:MetaspaceSize=1024m -XX:MaxMetaspaceSize=2048m -Dinfinispan.site.name=NYC -Dinfinispan.site.max_relay_nodes=2 -Djgroups.version.check=false -Djgroups.mcast_port=46666" -e IDENTITIES_BATCH="/user-config/identities.batch" quay.io/infinispan-test/server:main --node-name=infinispan-4-nyc-e2e -c "infinispan-xsite.xml" -c "/user-config/e2eTestsConfigNYC.xml"
docker run -d -p 41222:11222 -v ${{ github.workspace }}/scripts/identities.batch:/user-config/identities.batch -v ${{ github.workspace }}/dist:/opt/infinispan/static/console -v ${{ github.workspace }}/scripts/infinispan-local.xml:/user-config/infinispan-local.xml -e JAVA_OPTS="-Xms1024m -Xmx3072m -XX:MetaspaceSize=1024m -XX:MaxMetaspaceSize=2048m" -e IDENTITIES_BATCH="/user-config/identities.batch" quay.io/infinispan-test/server:main --node-name=infinispan-4-local-e2e -c "/user-config/infinispan-local.xml"
docker run --name ispn-nyc-1 -d -p 51222:11222 -v ${{ github.workspace }}/scripts/identities.batch:/user-config/identities.batch -v ${{ github.workspace }}/dist:/opt/infinispan/static/console -v ${{ github.workspace }}/scripts/e2eTestsConfigNYC.xml:/user-config/e2eTestsConfigNYC.xml -e JAVA_OPTS="-Xms1024m -Xmx3072m -XX:MetaspaceSize=1024m -XX:MaxMetaspaceSize=2048m -Dinfinispan.site.name=NYC -Dinfinispan.site.max_relay_nodes=2 -Djgroups.version.check=false -Djgroups.mcast_port=46666" -e IDENTITIES_BATCH="/user-config/identities.batch" quay.io/infinispan/server:16.0.0.dev07 --node-name=infinispan-4-nyc-1-e2e -c infinispan-xsite.xml -c "/user-config/e2eTestsConfigNYC.xml"
# Wait for server to startup
curl --fail --silent --show-error --retry-all-errors --retry 240 --retry-delay 1 http://localhost:11222/rest/v2/cache-managers/default/health/status > /dev/null
curl --fail --silent --show-error --retry-all-errors --retry 240 --retry-delay 1 http://localhost:31222/rest/v2/cache-managers/default/health/status > /dev/null
#Installing Nashorn dependencies
#Adding nashorn libraries to both containers
for containerId in $(docker ps -q)
do
docker exec -i $containerId /opt/infinispan/bin/cli.sh install org.openjdk.nashorn:nashorn-core:15.6
docker exec -i $containerId /opt/infinispan/bin/cli.sh install org.ow2.asm:asm:9.4
docker exec -i $containerId /opt/infinispan/bin/cli.sh install org.ow2.asm:asm-commons:9.4
docker exec -i $containerId /opt/infinispan/bin/cli.sh install org.ow2.asm:asm-tree:9.4
docker exec -i $containerId /opt/infinispan/bin/cli.sh install org.ow2.asm:asm-util:9.4
done
- name: Restarting Infinispan Servers After Nashorn Installation
run: |
docker restart $(docker ps -q)
# Wait for servers to startup
curl --fail --silent --show-error --retry-all-errors --retry 240 --retry-delay 1 http://localhost:11222/rest/v2/cache-managers/default/health/status > /dev/null
curl --fail --silent --show-error --retry-all-errors --retry 240 --retry-delay 1 http://localhost:31222/rest/v2/cache-managers/default/health/status > /dev/null
curl --fail --silent --show-error --retry-all-errors --retry 240 --retry-delay 1 http://localhost:41222/rest/v2/cache-managers/default/health/status > /dev/null
curl --fail --silent --show-error --retry-all-errors --retry 240 --retry-delay 1 http://localhost:51222/rest/v2/cache-managers/default/health/status > /dev/null
- name: Initialize Infinispan Server
run: cd data; bash ./create-data.sh admin password
- name: Cypress run
uses: cypress-io/github-action@v4
with:
config-file: cypress.config.ts
- name: Uploading test results
uses: actions/[email protected]
if: failure()
with:
name: screenshots
path: ${{ github.workspace }}/cypress/screenshots/**/**
retention-days: 1
- name: Get thread dump on failure
if: failure()
run: docker kill $(docker ps -q) -s 3
- name: Dump docker logs on failure
if: failure()
uses: jwalton/gh-docker-logs@v1