Skip to content

Commit

Permalink
simplify workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
mshima committed Nov 6, 2023
1 parent 71e9c1b commit d3a799f
Showing 1 changed file with 16 additions and 36 deletions.
52 changes: 16 additions & 36 deletions .github/workflows/smoke-test-imperative.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest]
node: [18]
java: [17]
app:
- imperative-ngx-jwt-maven-mysql-caffeine
- imperative-ngx-jwt-maven-mongodb-caffeine
Expand All @@ -53,47 +55,29 @@ jobs:
with:
path: generator-jhipster-quarkus
fetch-depth: 5
- name: 'SETUP: Checkout generator-jhipster'
uses: actions/checkout@v3
with:
repository: 'jhipster/generator-jhipster'
ref: v8.0.0-rc.1
path: generator-jhipster
- name: 'SETUP: environment'
id: setup
uses: ./generator-jhipster/.github/actions/setup
with:
jdl-sample: ${{ github.workspace }}/generator-jhipster-quarkus/.blueprint/generate-sample/templates/samples/${{ matrix.app }}.jdl
generator-jhipster-branch: local
jhipster-bom-branch: ignore
package-with-executable: generator-jhipster-quarkus
executable: jhipster-quarkus
- uses: actions/setup-node@v3
with:
# use node 16 for compare
node-version: 16
node-version: ${{matrix.node}}
- uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '17'
java-version: ${{matrix.java}}
- uses: graalvm/setup-graalvm@v1
id: graalvm
if: ${{ !contains(fromJson('["push", "pull_request"]'), github.event_name) || contains(matrix.app, 'mysql-caffeine') }}
with:
java-version: '17'
java-version: ${{matrix.java}}
distribution: 'graalvm'
components: 'native-image'
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: 'install blueprint'
run: npm install && npm link
run: npm install && npm link && mkdir ${{ github.workspace }}/app && mkdir -p ${{ github.workspace }}/base/app
working-directory: ${{ github.workspace }}/generator-jhipster-quarkus/
#----------------------------------------------------------------------
# Generate project
#----------------------------------------------------------------------
- name: 'GENERATION: project'
run: |
ls -la
jhipster-quarkus generate-sample ${{ matrix.app }}
run: jhipster-quarkus generate-sample ${{ matrix.app }}
#----------------------------------------------------------------------
# Detect changes against base commit
#----------------------------------------------------------------------
Expand All @@ -106,8 +90,8 @@ jobs:
git checkout @~1
npm install
npm link
$JHI_SCRIPTS/11-generate-config.sh
$JHI_SCRIPTS/12-generate-project.sh --skip-install --skip-git
cd ${{ github.workspace }}/base/app
jhipster-quarkus generate-sample ${{ matrix.app }} --skip-install --skip-git
cp -a "${{ github.workspace }}/app/.git" "${{ github.workspace }}/base/app/"
working-directory: ${{ github.workspace }}/generator-jhipster-quarkus/
env:
Expand All @@ -131,8 +115,6 @@ jobs:
'.gitignore' '**/.gitignore' \
'.gitattributes' '**/.gitattributes' \
'README.md' '**/README.md' \
'src/main/webapp/**' '**/src/main/webapp/**' \
'src/test/javascript/**' '**/test/javascript/**' \
'.jhipster/**' '**/.jhipster/**'
echo "::endgroup::"
echo "Showing source diff changes (will trigger builds)"
Expand All @@ -142,8 +124,6 @@ jobs:
':!.gitignore' ':!**/.gitignore' \
':!.gitattributes' ':!**/.gitattributes' \
':!README.md' ':!**/README.md' \
':!src/main/webapp/**' ':!**/src/main/webapp/**' \
':!src/test/javascript/**' ':!**/test/javascript/**' \
':!.jhipster/**' ':!**/.jhipster/**' \
':!package-lock.json' ':!**/package-lock.json' \
':!**/keystore.p12' \
Expand All @@ -155,33 +135,33 @@ jobs:
#----------------------------------------------------------------------
- name: 'Run JHipster Application server tests'
run: npm run ci:backend:test
working-directory: ${{ steps.setup.outputs.application-path }}
working-directory: ${{ github.workspace }}/app
- name: 'Run JHipster Application client tests'
run: npm run ci:frontend:test
working-directory: ${{ steps.setup.outputs.application-path }}
working-directory: ${{ github.workspace }}/app
- name: 'Packaging'
run: npm run ci:e2e:package
working-directory: ${{ steps.setup.outputs.application-path }}
working-directory: ${{ github.workspace }}/app
- name: 'E2E: Start docker-compose containers for e2e tests'
if: steps.compare.outputs.equals != 'true'
run: npm run ci:e2e:prepare
working-directory: ${{ steps.setup.outputs.application-path }}
working-directory: ${{ github.workspace }}/app
- name: 'E2E: Run'
if: steps.compare.outputs.equals != 'true'
id: e2e
run: npm run ci:e2e:run --if-present
working-directory: ${{ steps.setup.outputs.application-path }}
working-directory: ${{ github.workspace }}/app
- name: 'E2E: Store failure screenshots'
uses: actions/upload-artifact@v2
if: always() && steps.e2e.outcome == 'failure'
with:
name: screenshots-${{ matrix.app }}
path: ${{ steps.setup.outputs.application-path }}/*/cypress/screenshots
path: ${{ github.workspace }}/app/*/cypress/screenshots
- name: 'Native: Build Image'
if: steps.graalvm.outcome == 'success'
id: native
run: npm run ci:native:prod
working-directory: ${{ steps.setup.outputs.application-path }}
working-directory: ${{ github.workspace }}/app
- name: 'Native: Store failsafe reports'
uses: actions/upload-artifact@v2
if: always() && steps.native.outcome == 'failure'
Expand Down

0 comments on commit d3a799f

Please sign in to comment.