Skip to content

migrate to eslint v9 #3028

migrate to eslint v9

migrate to eslint v9 #3028

Workflow file for this run

name: Ionic
concurrency:
# Group PRs by head_ref, push to main branch by commit id, and others branch by ref.
group: ${{ github.workflow }}-${{ github.head_ref || (github.ref == 'refs/heads/main' && github.sha) || github.ref }}
cancel-in-progress: true
on:
push:
branches:
- main
pull_request:
branches:
- '*'
env:
JHIPSTER_INSTALL: ${{ github.workspace }}/generator-jhipster-ionic/test-integration/install
JHIPSTER_SAMPLES: ${{ github.workspace }}/generator-jhipster-ionic/test-integration/jdl
#environment properties
TZ: America/Denver
SPRING_OUTPUT_ANSI_ENABLED: ALWAYS
SPRING_JPA_SHOW_SQL: false
NG_CLI_ANALYTICS: false
# https://github.com/cypress-io/cypress/issues/27962#issuecomment-1746294247
NODE_OPTIONS: --dns-result-order=ipv4first
jobs:
samples:
name: ${{ matrix.jdl }}
runs-on: ${{ matrix.os }}
if: "!contains(github.event.head_commit.message, '[ci skip]') && !contains(github.event.head_commit.message, '[skip ci]') && !contains(github.event.pull_request.title, '[skip ci]') && !contains(github.event.pull_request.title, '[ci skip]') && !contains(github.event.ref_type, '[tag]')"
timeout-minutes: 40
defaults:
run:
working-directory: ${{ github.workspace }}/backend
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
jdl:
- monolith-jwt.jdl
- monolith-oauth2.jdl
- gateway-oauth2.jdl
- reactive-oauth2.jdl
- 21-points.jdl
- flickr2.jdl
include:
- jdl: monolith-jwt.jdl
e2e: 1
- jdl: monolith-oauth2.jdl
e2e: 1
- jdl: gateway-oauth2.jdl
e2e: 1
- jdl: reactive-oauth2.jdl
e2e: 1
- jdl: 21-points.jdl
e2e: 1
- jdl: flickr2.jdl
e2e: 1
steps:
- uses: jhipster/actions/create-app-path@v0
with:
path: ${{ github.workspace }}/backend
- uses: jhipster/actions/setup-runner@v0
with:
node-version: 20
java-version: 17
maven-cache: true
gradle-cache: true
binary-dir: ${{ github.workspace }}/generator-jhipster-ionic/cli/
- uses: actions/checkout@v4
with:
path: generator-jhipster-ionic
fetch-depth: 2
- name: 'Install blueprint'
run: npm install
working-directory: ${{ github.workspace }}/generator-jhipster-ionic
- name: Check Version
run: $JHIPSTER_INSTALL/02-checkVersion.sh
- run: cli.cjs generate-sample ${{ matrix.jdl }} --skip-jhipster-dependencies
- uses: jhipster/actions/compare-sample@v0
id: compare-backend
if: >-
github.event.pull_request &&
contains(github.event.pull_request.labels.*.name, 'pr: compare-backend')
with:
application-base-path: ${{ github.workspace }}/backend-base
application-folder: backend
compare-folder: backend
generator-path: generator-jhipster-ionic
cmd: cli.cjs generate-sample ${{ matrix.jdl }} --skip-git --skip-jhipster-dependencies --skip-install
- uses: jhipster/actions/compare-sample@v0
id: compare
if: >-
github.event.pull_request &&
!contains(github.event.pull_request.labels.*.name, 'pr: disable-compare') &&
steps.compare-backend.outputs.has-changes != 'true'
with:
application-folder: backend
compare-folder: ionic4j
generator-path: generator-jhipster-ionic
cmd: cli.cjs generate-sample ${{ matrix.jdl }} --skip-git --skip-jhipster-dependencies --skip-install
- name: Ionic tests
run: cat package.json; npm install; npm test
working-directory: ${{ github.workspace }}/ionic4j
- name: Build application docker image
if: steps.compare.outputs.equals != 'true'
run: npm run java:docker:prod
- name: Launch backend application
run: npm run app:up
if: steps.compare.outputs.equals != 'true'
- name: Wait for backend to start
run: npm run ci:server:await
if: steps.compare.outputs.equals != 'true'
- name: Launch ionic e2e test
id: e2e
if: matrix.e2e == 1 && steps.compare.outputs.equals != 'true'
uses: cypress-io/github-action@v6
with:
browser: chrome
command: npm run e2e:ci
working-directory: ${{ github.workspace }}/ionic4j
- name: 'E2E: Store failure screenshots'
uses: actions/upload-artifact@v4
if: always() && steps.e2e.outcome == 'failure'
with:
name: screenshots-${{ matrix.jdl }}
path: ${{ github.workspace }}/ionic4j/cypress/screenshots
- name: 'E2E: Store failure videos'
uses: actions/upload-artifact@v4
if: always() && steps.e2e.outcome == 'failure'
with:
name: videos-${{ matrix.jdl }}
path: ${{ github.workspace }}/ionic4j/cypress/videos
- name: Dump docker logs on failure
if: failure()
uses: jwalton/gh-docker-logs@v2
check-samples:
permissions:
contents: none
runs-on: ubuntu-latest
needs: [samples]
if: always()
steps:
- run: |
echo '${{ toJSON(needs) }}'
if [ 'skipped' == '${{ needs.samples.result }}' ] || [ 'success' == '${{ needs.samples.result }}' ] || [ 'closed' == '${{ github.event.action }}' ]; then
exit 0
fi
exit 1