Skip to content

Update to Patternfly 6 #1064

Update to Patternfly 6

Update to Patternfly 6 #1064

Workflow file for this run

name: Test
on:
push:
branches:
- main
- 14.x
pull_request:
branches:
- main
- 14.x
jobs:
test:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v3
with:
node-version: 20.7.0
cache: 'npm'
- name: Install
run: npm ci
- name: Unit Test
run: npm test
- name: Build Distribution
run: npm run build
# It's not possible to use GH action services, as we need to mount custom configuration from checked out source to the server
- if: github.base_ref == 'main' || github.ref_name == 'main'
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/infinispan-basic-auth.xml:/opt/infinispan/server/conf/infinispan.xml -e JAVA_OPTIONS="-Xms1024m -Xmx3072m -XX:MetaspaceSize=1024m -XX:MaxMetaspaceSize=2048m -Dinfinispan.site.name=LON -Djgroups.mcast_port=46656" -e IDENTITIES_BATCH="/user-config/identities.batch" quay.io/infinispan-test/server:main --node-name=infinispan-4-e2e
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/infinispan-basic-auth.xml:/opt/infinispan/server/conf/infinispan.xml -e JAVA_OPTIONS="-Xms1024m -Xmx3072m -XX:MetaspaceSize=1024m -XX:MaxMetaspaceSize=2048m -Dinfinispan.site.name=NYC -Djgroups.mcast_port=46666" -e IDENTITIES_BATCH="/user-config/identities.batch" quay.io/infinispan-test/server:main --node-name=infinispan-4-e2e
# 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.4
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
- if: github.base_ref == '14.x' || github.ref_name == '14.x'
name: Start Infinispan Server 14.x Version
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/infinispan-basic-auth.xml:/opt/infinispan/server/conf/infinispan.xml -e JAVA_OPTIONS="-Xms1024m -Xmx3072m -XX:MetaspaceSize=1024m -XX:MaxMetaspaceSize=2048m" -e IDENTITIES_BATCH="/user-config/identities.batch" quay.io/infinispan-test/server:14.0.x --node-name=infinispan-4-e2e
# 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
#Installing Nashorn dependencies
docker exec $(docker ps -q -l) /opt/infinispan/bin/cli.sh install org.openjdk.nashorn:nashorn-core:15.4
docker exec $(docker ps -q -l) /opt/infinispan/bin/cli.sh install org.ow2.asm:asm:9.4
docker exec $(docker ps -q -l) /opt/infinispan/bin/cli.sh install org.ow2.asm:asm-commons:9.4
docker exec $(docker ps -q -l) /opt/infinispan/bin/cli.sh install org.ow2.asm:asm-tree:9.4
docker exec $(docker ps -q -l) /opt/infinispan/bin/cli.sh install org.ow2.asm:asm-util:9.4
- 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
- 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/upload-artifact@v3
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