Skip to content

PiT 24.2.0.alpha5 (lin=false win=false skip=true) #237

PiT 24.2.0.alpha5 (lin=false win=false skip=true)

PiT 24.2.0.alpha5 (lin=false win=false skip=true) #237

Workflow file for this run

name: PiT
run-name: PiT ${{ inputs.version }} (lin=${{inputs.linux}} win=${{inputs.windows}} skip=${{inputs.skipcurrent}}) ${{inputs.starters}}
on:
workflow_dispatch:
inputs:
version:
description: 'Version'
required: false
type: string
starters:
description: 'Starters to run, separated by comma'
required: false
type: string
skipcurrent:
description: 'Skip running tests in current version'
required: false
type: boolean
default: false
skipdev:
description: 'Skip running tests in dev mode'
required: false
type: boolean
default: false
skipprod:
description: 'Skip running tests in production mode'
required: false
type: boolean
default: false
linux:
description: 'Run build in linux runner'
required: false
type: boolean
default: false
windows:
description: 'Run build in windows runner'
required: false
type: boolean
default: false
generated:
description: 'Generate and run all supported start presets and archetypes'
required: false
type: boolean
default: false
demos:
description: 'Checkout and run all demos'
required: false
type: boolean
default: false
join:
description: 'Number of apps to run per container (default 1)'
required: false
type: choice
options: ["1", "2", "3", "4"]
default: "1"
jobs:
prepare:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.set.outputs.matrix }}
steps:
- id: set
shell: bash
run: |
# COMPUTE MATRIX
echo "Computing matrix ..."
[ -z "${{secrets.GHTK}}" -o -z "${{secrets.TB_LICENSE}}" -o -z "${{secrets.SS_LICENSE}}" ] && exit 1
git clone -q https://${{secrets.GHTK}}@github.com/vaadin/platform-in-test-script.git pit
V="${{github.event.inputs.version}}"
W="${{github.event.inputs.windows}}"
L="${{github.event.inputs.linux}}"
[ true != "$L" -a true != "$W" ] && L=true
S="${{github.event.inputs.starters}}"
[ true = "${{github.event.inputs.v24}}" ] && A="$A --v24"
[ true = "${{github.event.inputs.pre}}" ] && A="$A --pre"
[ true = "${{github.event.inputs.generated}}" ] && A="$A --generated"
[ true = "${{github.event.inputs.demos}}" ] && A="$A --demos"
[ -z "$S" ] && S=`./pit/scripts/pit/run.sh $A --list=${{github.event.inputs.join}}`
M='{"include":['
for i in `echo $S`; do
J='{"app":"'$i'"'
[ -n "$V" ] && J=$J',"version":"'$V'"'
[ true = "$W" ] && M=$M$J',"os":"windows"},'
[ true = "$L" ] && M=$M$J',"os":"ubuntu"},'
done
M=`echo $M | sed -e s/,$//`']}'
echo "$M"
echo "matrix=$M" >> $GITHUB_OUTPUT
run:
needs: prepare
strategy:
fail-fast: false
matrix: ${{fromJson(needs.prepare.outputs.matrix)}}
runs-on: ${{matrix.os}}-latest
steps:
- run: |
# TEST PARAMETERS
[ -z "${{matrix.app}}" ] && exit 1
echo "RUNNING TEST FOR ${{matrix.app}} APP"
shell: bash
- run: |
# INSTALL PIT
git clone https://${{secrets.GHTK}}@github.com/vaadin/platform-in-test-script.git pit
cd pit && git rev-parse --short HEAD
shell: bash
- run: |
# INSTALL LICENSE
mkdir -p ~/.vaadin/
echo '{"username":"'`echo ${{secrets.TB_LICENSE}} | cut -d / -f1`'","proKey":"'`echo ${{secrets.TB_LICENSE}} | cut -d / -f2`'"}' > ~/.vaadin/proKey
echo "${{secrets.SS_LICENSE}}" > ~/vaadin.spreadsheet.developer.license
shell: bash
- if: ${{ env.ACT }}
run: |
# Install linux libs (ACT)
# see https://github.com/browser-actions/setup-chrome/issues/240
sudo ./pit/scripts/pit/docker/setup.sh --lib-chrome
- uses: browser-actions/setup-chrome@latest
- uses: actions/setup-node@v3
with:
node-version: '18'
- uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
- uses: stCarolas/[email protected]
with:
maven-version: '3.9.0'
- run: |
# PIT TESTS ${{matrix.app}} ${{github.event.inputs.version}}
[ -n "${{github.event.inputs.version}}" ] && ARG="--version=${{github.event.inputs.version}}"
[ true = "${{github.event.inputs.skipcurrent}}" ] && ARG="$ARG --skip-current"
[ true = "${{github.event.inputs.skipdev}}" ] && ARG="$ARG --skip-dev"
[ true = "${{github.event.inputs.skipprod}}" ] && ARG="$ARG --skip-prod"
[ true = "${{github.event.inputs.debug}}" ] && ARG="$ARG --debug"
echo "${{matrix.app}}" | grep "^v24" && ARG="$ARG --v24"
echo "${{matrix.app}}" | grep "^pre" && ARG="$ARG --pre"
ARG="$ARG --starters=${{matrix.app}}"
echo ./pit/scripts/pit/run.sh $ARG
GHTK=${{secrets.GHTK}} ./pit/scripts/pit/run.sh $ARG
shell: bash
- if: ${{failure()}}
uses: actions/[email protected]
with:
name: failed-outputs
path: tmp/**/*.out
if-no-files-found: warn
retention-days: 7