chore: update package[-lock].json (1.5) #7516
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: Validation | |
on: | |
push: | |
branches: [ main, '1.5' ] | |
paths-ignore: | |
- 'hilla-logo.svg' | |
- 'README.md' | |
- '.github/ISSUE_TEMPLATE/*' | |
- 'packages/**/README.md' | |
pull_request_target: | |
paths-ignore: | |
- 'hilla-logo.svg' | |
- 'README.md' | |
- '.github/ISSUE_TEMPLATE/*' | |
- 'packages/**/README.md' | |
jobs: | |
init: | |
name: Build | |
runs-on: ubuntu-latest | |
timeout-minutes: 15 | |
env: | |
NX_SKIP_NX_CACHE: true | |
steps: | |
- name: Check Secrets | |
run: | | |
TB_LICENSE="${{secrets.TB_LICENSE}}" | |
[ -z "$TB_LICENSE" ] \ | |
&& echo "::error::!! ERROR NO TB_LICENSE: Check that this repo has a valid TB_LICENSE secret !!" \ | |
&& exit 1 || exit 0 | |
- name: Checkout Project Code | |
uses: actions/checkout@v3 | |
with: | |
ref: ${{ github.event.pull_request.head.sha }} | |
fetch-depth: 0 | |
- name: Setup | |
uses: ./.github/actions/setup | |
- name: Validate Java Format | |
run: mvn -B formatter:validate | |
- name: Build TypeScript | |
run: npm run build | |
- name: Lint TypeScript | |
run: npm run check | |
- name: Build Java | |
run: mvn install -B -ntp -DskipTests | |
- name: Save Workspace | |
run: | | |
tar cf workspace.tar -C ~/ $( \ | |
mvn -q -DskipTests \ | |
-Dexec.executable='echo' \ | |
-Dexec.args='${project.groupId}:${project.artifactId}' \ | |
-Dexec.skip='${maven.deploy.skip}' \ | |
exec:exec \ | |
| tr '.:' '/' \ | |
| sed -e 's/^/.m2\/repository\//' \ | |
) | |
tar rf workspace.tar $(find packages/java -d -name target) | |
tar rf workspace.tar $(find packages/ts -name node_modules -prune -o -print | git check-ignore --stdin) | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: saved-workspace | |
path: workspace.tar | |
retention-days: 1 | |
if-no-files-found: error | |
test-java: | |
needs: init | |
name: Test Java | |
runs-on: ubuntu-latest | |
timeout-minutes: 15 | |
strategy: | |
fail-fast: false | |
steps: | |
- name: Checkout Project Code | |
uses: actions/checkout@v3 | |
with: | |
ref: ${{ github.event.pull_request.head.sha }} | |
fetch-depth: 0 | |
- name: Setup | |
uses: ./.github/actions/setup | |
- uses: actions/download-artifact@v3 | |
with: | |
name: saved-workspace | |
- name: Restore Workspace | |
run: | | |
set -x | |
tar xf workspace.tar | |
tar cf - .m2 | (cd ~ && tar xf -) | |
- name: Test | |
run: mvn -B -am -P\!it-modules verify | |
- name: Collect Coverage | |
run: | | |
COVFILES=$(find packages/java -wholename 'target/site/jacoco/jacoco.xml' | tr '\n' ',' | sed '$s/,$//') | |
echo "COVFILES=$COVFILES" >> $GITHUB_ENV | |
- name: Send Coverage to Codecov | |
if: ${{ env.COVFILES != '' }} | |
uses: codecov/codecov-action@v3 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
files: ${{ env.COVFILES }} | |
flags: unittests | |
fail_ci_if_error: true | |
root_dir: ${{ github.workspace }} | |
test-typescript: | |
needs: init | |
name: Test TypeScript | |
runs-on: ubuntu-latest | |
timeout-minutes: 20 | |
strategy: | |
fail-fast: false | |
steps: | |
- name: Install Chrome | |
uses: browser-actions/setup-chrome@v1 | |
- name: Checkout Project Code | |
uses: actions/checkout@v3 | |
with: | |
ref: ${{ github.event.pull_request.head.sha }} | |
fetch-depth: 0 | |
- name: Setup | |
uses: ./.github/actions/setup | |
- uses: actions/download-artifact@v3 | |
with: | |
name: saved-workspace | |
- name: Restore Workspace | |
run: | | |
set -x | |
tar xf workspace.tar | |
tar cf - .m2 | (cd ~ && tar xf -) | |
- name: Test | |
run: npm run test:coverage | |
env: | |
CI: true | |
- name: Collect Coverage | |
run: | | |
COVFILES=$(find packages/ts -wholename '*/.coverage/lcov.info' | tr '\n' ',' | sed '$s/,$//') | |
echo "COVFILES=$COVFILES" >> $GITHUB_ENV | |
- name: Send Coverage to Codecov | |
uses: codecov/codecov-action@v3 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
files: ${{ env.COVFILES }} | |
flags: unittests | |
fail_ci_if_error: true | |
root_dir: ${{ github.workspace }} | |
test-it: | |
needs: | |
- init | |
- test-java | |
- test-typescript | |
name: ITs | |
runs-on: ubuntu-latest | |
timeout-minutes: 20 | |
strategy: | |
fail-fast: false | |
matrix: | |
hillaEngine: [false, true] | |
package: | |
- tests | |
java-version: | |
- 11 | |
include: | |
- package: tests/spring/endpoints-latest-java | |
java-version: 17 | |
hilla-engine: false | |
steps: | |
- name: Checkout Project Code | |
uses: actions/checkout@v3 | |
with: | |
ref: ${{ github.event.pull_request.head.sha }} | |
fetch-depth: 0 | |
- name: Setup | |
uses: ./.github/actions/setup | |
with: | |
java-version: ${{ matrix.java-version }} | |
- uses: actions/download-artifact@v3 | |
with: | |
name: saved-workspace | |
- name: Restore Workspace | |
run: | | |
set -x | |
tar xf workspace.tar | |
tar cf - .m2 | (cd ~ && tar xf -) | |
- name: Set TB License | |
run: | | |
TB_LICENSE=${{secrets.TB_LICENSE}} | |
mkdir -p ~/.vaadin/ | |
echo '{"username":"'`echo $TB_LICENSE | cut -d / -f1`'","proKey":"'`echo $TB_LICENSE | cut -d / -f2`'"}' > ~/.vaadin/proKey | |
- name: Verify | |
run: | | |
( | |
cd packages/java/${{ matrix.package }} && \ | |
mvn -B -am -ntp -fae \ | |
-Dfailsafe.forkCount=4 \ | |
-Dcom.vaadin.testbench.Parameters.testsInParallel=5 \ | |
-Dfailsafe.rerunFailingTestsCount=2 \ | |
-Dmaven.wagon.httpconnectionManager.ttlSeconds=25 \ | |
-Dmaven.wagon.http.retryHandler.count=3 \ | |
-Dvaadin.hillaEngine=${{ matrix.hillaEngine }} \ | |
verify | |
) | |
- uses: actions/upload-artifact@v3 | |
if: ${{ failure() || success() }} | |
with: | |
name: saved-outputs | |
path: | | |
packages/java/tests/**/target/*-reports/* | |
packages/java/tests/**/error-screenshots/*.png | |
test-all: | |
name: Tests Summary | |
runs-on: ubuntu-latest | |
if: ${{ always() }} | |
needs: | |
- test-it | |
steps: | |
- name: Fail if test jobs did not succeed | |
if: ${{ needs.test-it.result != 'success' }} | |
run: exit 1 |