Skip to content

Bump axios and generator-jhipster #1162

Bump axios and generator-jhipster

Bump axios and generator-jhipster #1162

Workflow file for this run

name: Verify Sample Projects
on:
push:
branches:
- 'main'
- '**maintenance'
paths-ignore:
- 'package*.json'
pull_request:
branches:
- '*'
env:
JHI_E2E_HEADLESS: true
permissions:
contents: read
jobs:
build-matrix:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.build.outputs.matrix }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
- uses: actions/setup-node@v4
with:
node-version: '20'
- id: build
run: |
npm install
npm link
mhipster github-build-matrix
samples:
name: ${{ matrix.sample-name }}
runs-on: ubuntu-latest
needs: build-matrix
defaults:
run:
working-directory: ${{ github.workspace }}/app
timeout-minutes: 30
strategy:
fail-fast: false
matrix: ${{fromJson(needs.build-matrix.outputs.matrix)}}
steps:
- uses: actions/checkout@v4
with:
path: generator-jhipster-micronaut
fetch-depth: 2
- uses: jhipster/actions/setup-runner@v0
with:
java-version: ${{ matrix.java-version }}
node-version: ${{ matrix.node-version }}
binary-dir: ${{ github.workspace }}/generator-jhipster-micronaut/cli/
- name: 'Install blueprint'
run: npm install
working-directory: ${{ github.workspace }}/generator-jhipster-micronaut
- name: 'Generate Project'
run: cli.cjs generate-sample ${{ matrix.sample-name }} --skip-jhipster-dependencies --force
- uses: jhipster/actions/compare-sample@v0
id: compare
if: >-
github.event.pull_request &&
!contains(github.event.pull_request.labels.*.name, 'pr: disable-compare')
with:
generator-path: generator-jhipster-micronaut
cmd: cli.cjs generate-sample ${{ matrix.sample-name }} --skip-jhipster-dependencies --force --skip-install
- name: 'Start Dependency Containers'
if: steps.compare.outputs.equals != 'true'
run: npm run ci:e2e:prepare
- name: 'Run Server Tests'
if: steps.compare.outputs.equals != 'true'
run: npm run ci:backend:test
id: backend
- name: 'Run Client Tests'
if: steps.compare.outputs.equals != 'true'
run: npm run ci:frontend:test --if-present
- name: 'Build App'
if: steps.compare.outputs.equals != 'true'
run: npm run ci:e2e:package
- name: 'E2E Tests'
if: steps.compare.outputs.equals != 'true'
id: e2e
run: npm run ci:e2e:run --if-present
- name: 'BACKEND: Store failure logs'
uses: actions/upload-artifact@v4
if: always() && steps.backend.outcome == 'failure'
with:
name: log-${{ matrix.sample-name }}
path: |
${{ github.workspace }}/app/build/test-results/**/*.xml
${{ github.workspace }}/app/target/surefire-reports
- name: 'E2E: Store failure screenshots'
uses: actions/upload-artifact@v4
if: always() && steps.e2e.outcome == 'failure'
with:
name: screenshots-${{ matrix.sample-name }}
path: ${{ github.workspace }}/app/**/cypress/screenshots
- name: Dump docker logs
if: always()
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