Skip to content

nFlow Explorer version bumps #654

nFlow Explorer version bumps

nFlow Explorer version bumps #654

Workflow file for this run

name: Build and test
on:
push:
branches: [master]
pull_request:
branches: [master]
paths-ignore:
- '**/*.md'
concurrency:
group: build-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
permissions:
contents: read
checks: write
security-events: write
jobs:
build-and-test:
if: always()
strategy:
matrix:
java: [ '17', '21', '22' ]
runs-on: ubuntu-latest
steps:
- name: Check out
uses: actions/checkout@v4
- name: Set up Java
uses: actions/setup-java@v4
with:
java-version: ${{ matrix.java }}
distribution: 'temurin'
cache: 'maven'
- name: Run build and unit tests
run: mvn -T1C --no-transfer-progress --color=always -Dmaven.javadoc.skip=true -Dmaven.source.skip=true -am -pl nflow-jetty,nflow-netty,nflow-metrics test
- name: Publish JUnit test report
uses: scacap/action-surefire-report@v1
if: always()
with:
check_name: 'Unit Test Report for Java ${{ matrix.java }}'
build-and-test-nflow-explorer:
if: always()
runs-on: ubuntu-latest
steps:
- name: Check out
uses: actions/checkout@v4
- name: Set up Java
uses: actions/setup-java@v4
with:
java-version: 17
distribution: 'temurin'
cache: 'maven'
- name: Run build and unit tests
run: mvn -T1C --no-transfer-progress --color=always -Dmaven.javadoc.skip=true -Dmaven.source.skip=true -am -pl nflow-explorer test
javadoc-spotbugs-codeql:
runs-on: ubuntu-latest
steps:
- name: Check out
uses: actions/checkout@v4
- name: Set up Java
uses: actions/setup-java@v4
with:
java-version: 17
distribution: 'temurin'
cache: 'maven'
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: java, javascript
config-file: ./.github/codeql-config.yaml
- name: Generate JavaDocs and run SpotBugs
run: mvn -T1C --no-transfer-progress --color=always -Dmaven.source.skip=true -Dskip.npm -Dskip.bower -Dskip.grunt compile javadoc:javadoc spotbugs:check
- name: Publish SpotBugs report
uses: kpresler/spotbugs-github-action@master
with:
name: 'SpotBugs Report'
path: '**/spotbugsXml.xml'
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
integration-tests:
if: always()
strategy:
matrix:
java: [ '17', '21' ]
db: [ 'h2', 'mariadb', 'postgresql', 'mysql', 'sqlserver', 'db2', 'oracle' ]
runs-on: ubuntu-latest
env:
SPRING_PROFILES_ACTIVE: nflow.db.${{ matrix.db }}
DB_VERSION: ${{ matrix.java == 17 && 'old' || 'latest' }}
steps:
- name: Check out
uses: actions/checkout@v4
- name: Set up Java
uses: actions/setup-java@v4
with:
java-version: ${{ matrix.java }}
distribution: 'temurin'
cache: 'maven'
- name: Set up database
run: ./scripts/setup-db-${{ matrix.db }}.sh
- name: Build
run: mvn -T1C --no-transfer-progress --color=always -DskipTests -Dmaven.javadoc.skip=true -Dmaven.source.skip=true --am -pl nflow-tests install
- name: Run the integration tests
run: mvn -T1C --no-transfer-progress -Dsurefire.forkcount=1 --color=always -rf :nflow-tests surefire:test
- name: Publish JUnit test report
uses: scacap/action-surefire-report@v1
if: always()
with:
check_name: 'Integration Test Report for Java ${{ matrix.java }} and ${{ matrix.db }}'
- name: Upload test files as artifact
if: always()
uses: actions/upload-artifact@v4
with:
name: 'integrationtest-results-java${{ matrix.java }}-${{ matrix.db }}'
path: '**/target/surefire-reports/*.xml'
retention-days: 7