Skip to content

Commit

Permalink
testing hcnages
Browse files Browse the repository at this point in the history
  • Loading branch information
SudharakaP committed Dec 7, 2023
1 parent a8e571a commit 7a1c14f
Showing 1 changed file with 14 additions and 52 deletions.
66 changes: 14 additions & 52 deletions .github/workflows/linked-issue-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,28 +53,15 @@ jobs:
uses: actions/checkout@v4
with:
path: generator-jhipster
fetch-depth: 2
- name: 'SETUP: environment'
id: setup
uses: ./generator-jhipster/.github/actions/setup
- uses: actions/setup-node@v4
with:
node-version: ${{ steps.setup.outputs.node-version }}
- uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: ${{ steps.setup.outputs.java-version }}
fetch-depth: 1
- uses: ./generator-jhipster/.github/actions/setup-default-node-java
- uses: jhipster/actions/restore-cache@v0
with:
npm: true
maven: true
gradle: true
- name: 'TOOLS: configure tools installed by the system'
run: $JHI_SCRIPTS/03-system.sh
- name: 'TOOLS: configure git'
run: $JHI_SCRIPTS/04-git-config.sh
- name: 'Install required NPM version'
run: npm install -g npm@${{ steps.setup.outputs.npm-version }} || true
- uses: jhipster/action/setup-keycloak-hostname@v0
- uses: jhipster/action/setup-git@v0
#----------------------------------------------------------------------
# Install JHipster and generate project+entities
#----------------------------------------------------------------------
Expand All @@ -86,66 +73,41 @@ jobs:
- name: 'GENERATION: jhipster info'
run: $JHI_SCRIPTS/14-jhipster-info.sh
#----------------------------------------------------------------------
# Detect changes against base commit
#----------------------------------------------------------------------
- name: 'MERGE: generate base'
continue-on-error: true
id: base-app
if: >-
github.event.pull_request &&
!contains(github.event.pull_request.labels.*.name, 'pr: disable-compare')
uses: ./generator-jhipster/.github/actions/compare-base
with:
extra-args: '--skip-jhipster-dependencies ${{ matrix.extra-args }}'
- name: 'MERGE: compare changes'
continue-on-error: true
id: compare
if: steps.base-app.outcome == 'success'
uses: ./generator-jhipster/.github/actions/compare
with:
application-path: ${{ steps.base-app.outputs.application-path }}
#----------------------------------------------------------------------
# Launch tests
#----------------------------------------------------------------------
- name: 'PREPARE: npm install'
if: steps.compare.outputs.equals != 'true'
run: ${{ (matrix.workspaces == 'true' && 'npm') || './npmw' }} install
run: npm install
timeout-minutes: 7
- name: 'TESTS: backend'
id: backend
if: steps.compare.outputs.equals != 'true' && matrix.skip-backend-tests != 'true' && needs.build-matrix.outputs.server != 'false'
run: npm run ci:backend:test
continue-on-error: ${{matrix.continue-on-backend-tests-error || false}}
run: npm run ci:backend:test --if-present
timeout-minutes: 15
- name: 'TESTS: frontend'
if: steps.compare.outputs.equals != 'true' && matrix.skip-frontend-tests != 'true' && needs.build-matrix.outputs.client != 'false'
run: npm run ci:frontend:test
id: frontend
run: npm run ci:frontend:test --if-present
timeout-minutes: 15
- name: 'TESTS: packaging'
if: steps.compare.outputs.equals != 'true'
run: npm run ci:e2e:package
run: npm run ci:e2e:package --if-present
timeout-minutes: 12
- name: 'TESTS: Start docker compose containers for e2e tests'
if: steps.compare.outputs.equals != 'true'
run: npm run ci:e2e:prepare
run: npm run ci:e2e:prepare --if-present
timeout-minutes: 5
- name: 'E2E: Run'
id: e2e
if: steps.compare.outputs.equals != 'true'
run: npm run ci:e2e:run --if-present
timeout-minutes: 15
- name: 'BACKEND: Store failure logs'
uses: actions/upload-artifact@v3
if: always() && steps.backend.outcome == 'failure'
with:
name: log-${{ matrix.name }}
path: ${{ steps.setup.outputs.application-path }}/**/test-results/**/*.xml
name: log-${{ matrix.number }}
path: app/**/test-results/**/*.xml
- name: 'E2E: Store failure screenshots'
uses: actions/upload-artifact@v3
if: always() && steps.e2e.outcome == 'failure'
with:
name: screenshots-${{ matrix.name }}
path: ${{ steps.setup.outputs.application-path }}/**/cypress/screenshots
name: screenshots-${{ matrix.number }}
path: app/**/cypress/screenshots
- name: Dump docker logs
if: always()
uses: jwalton/gh-docker-logs@v2

0 comments on commit 7a1c14f

Please sign in to comment.