Skip to content

fix(velocity): replace velocityCount with foreach.count #143

fix(velocity): replace velocityCount with foreach.count

fix(velocity): replace velocityCount with foreach.count #143

Workflow file for this run

name: Build
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
outputs:
app_version: ${{steps.get-app-version.outputs.APP_VERSION}}
steps:
- uses: actions/checkout@v4
- id: get-app-version
name: Get archetype version
run: |
extracted_version=$(mvn -q -Dexec.executable=echo -Dexec.args='${project.version}' --non-recursive exec:exec)
echo "APP_VERSION=$extracted_version" >> $GITHUB_OUTPUT
- name: Build and test archetype
run: ./mvnw -B -ntp clean install
- name: Run Integration tests for java archetype sub-modules
run: ./mvnw -B -ntp groovy:execute -Dsource=target/test-classes/testJava11SubModuleProject/IT.groovy -Dscope=test
- name: Run Integration tests for groovy archetype sub-modules
run: ./mvnw -B -ntp groovy:execute -Dsource=target/test-classes/testGroovySubModuleProject/IT.groovy -Dscope=test
- name: Upload archetype for tests
uses: actions/upload-artifact@v2
with:
name: latest-snapshot
path: target/bonita-rest-api-extension-archetype-*
- name: Upload archetype pom for tests
uses: actions/upload-artifact@v2
with:
name: latest-snapshot-pom
path: pom.xml
test:
strategy:
matrix:
platform: [ubuntu-22.04, macos-12, windows-2022]
language: [java, kotlin, groovy]
runs-on: ${{ matrix.platform }}
needs: build
steps:
- name: Install Java and Maven
uses: actions/setup-java@v4
with:
java-version: 17
distribution: 'temurin'
- name: Download latest archetype snapshot
uses: actions/[email protected]
with:
name: latest-snapshot
- name: Download archetype pom
uses: actions/[email protected]
with:
name: latest-snapshot-pom
- name: Display structure of downloaded files
run: ls -R
- name: Install latest archetype in local repo
shell: bash
run: mvn -B -ntp install:install-file -Dfile=bonita-rest-api-extension-archetype-${{needs.build.outputs.app_version}}.jar -DpomFile=pom.xml && rm pom.xml
- name: Generate project and build it
shell: bash
run: >-
mvn -B -ntp archetype:generate
-DarchetypeGroupId=org.bonitasoft.archetypes
-DarchetypeArtifactId=bonita-rest-api-extension-archetype
-DarchetypeVersion=${{needs.build.outputs.app_version}}
-DgroupId=org.bonita.test.apiext
-DartifactId=test-apiext-${{ matrix.language }}
-Dversion=1.0.0-SNAPSHOT
-Dpackage=org.bonita.test.api
-DbonitaVersion=7.10.0
-Dsp=false
-Dlanguage=${{ matrix.language }}
-DapiName=${{ matrix.language }}-api
-DapiDisplayName="My ${{ matrix.language }} API"
-DhttpVerb=GET
-DpathTemplate=${{ matrix.language }}-api
- name: Build and test generated project
shell: bash
run: mvn -B -ntp verify -f test-apiext-${{ matrix.language }}/pom.xml