#513: Generate quality metrics.json #1183
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test Linux build on windows | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
jobs: | |
build-on-linux: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
defaults: | |
run: | |
shell: "bash" | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
steps: | |
- name: Checkout the repository | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Set up JDKs | |
uses: actions/setup-java@v4 | |
with: | |
distribution: "temurin" | |
java-version: 17 | |
cache: "maven" | |
- name: Set up Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: "1.22" | |
- name: Cache Go modules | |
uses: actions/cache@v4 | |
with: | |
path: | | |
~/.cache/go-build | |
~/go/pkg/mod | |
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | |
restore-keys: | | |
${{ runner.os }}-go- | |
- name: Install Go tools | |
run: go install github.com/google/[email protected] | |
- name: Build project-keeper | |
run: | | |
mvn --batch-mode -T 1C clean package -DskipTests -DtrimStackTrace=false \ | |
-Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn | |
- name: Strip version number | |
run: | | |
mkdir artifact | |
cp $(find project-keeper/target/ -regextype sed -regex ".*/project-keeper-core-[0-9]\+\.[0-9]\+\.[0-9]\+\(-SNAPSHOT\)\?\.jar") artifact/project-keeper-core.jar | |
cp project-keeper/.flattened-pom.xml artifact/project-keeper-core.pom | |
cp $(find maven-project-crawler/target/ -regextype sed -regex ".*/project-keeper-java-project-crawler-[0-9]\+\.[0-9]\+\.[0-9]\+\(-SNAPSHOT\)\?\.jar") artifact/maven-project-crawler.jar | |
cp maven-project-crawler/.flattened-pom.xml artifact/maven-project-crawler.pom | |
cp $(find shared-model-classes/target/ -regextype sed -regex ".*/project-keeper-shared-model-classes-[0-9]\+\.[0-9]\+\.[0-9]\+\(-SNAPSHOT\)\?\.jar") artifact/shared-model-classes.jar | |
cp shared-model-classes/.flattened-pom.xml artifact/shared-model-classes.pom | |
cp $(find project-keeper-maven-plugin/target/ -regextype sed -regex ".*/project-keeper-maven-plugin-[0-9]\+\.[0-9]\+\.[0-9]\+\(-SNAPSHOT\)\?\.jar") artifact/project-keeper-maven-plugin.jar | |
cp project-keeper-maven-plugin/.flattened-pom.xml artifact/project-keeper-maven-plugin.pom | |
- name: Upload jar artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: project-keeper-jar | |
path: artifact | |
retention-days: 1 | |
run-on-windows: | |
runs-on: windows-latest | |
permissions: | |
contents: read | |
needs: build-on-linux | |
steps: | |
- name: Checkout the repository | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Set up JDKs | |
uses: actions/setup-java@v4 | |
with: | |
distribution: "temurin" | |
java-version: | | |
11 | |
17 | |
cache: "maven" | |
- name: Download jar | |
uses: actions/download-artifact@v4 | |
with: | |
name: project-keeper-jar | |
- name: List files | |
run: ls | |
- name: Install project-keeper | |
shell: pwsh | |
run: | | |
mvn --batch-mode install:install-file -Dfile="shared-model-classes.jar" ` | |
-DpomFile="shared-model-classes.pom" ` | |
"-Dorg.slf4j.simpleLogger.log.org.apache.aven.cli.transfer.Slf4jMavenTransferListener=warn" | |
mvn --batch-mode install:install-file -Dfile="maven-project-crawler.jar" ` | |
-DpomFile="maven-project-crawler.pom" ` | |
"-Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn" | |
mvn --batch-mode install:install-file -Dfile="project-keeper-core.jar" ` | |
-DpomFile="project-keeper-core.pom" ` | |
"-Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn" | |
mvn --batch-mode install:install-file -Dfile="project-keeper-maven-plugin.jar" ` | |
-DpomFile="project-keeper-maven-plugin.pom" ` | |
"-Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn" | |
- name: run project-keeper | |
shell: pwsh | |
run: mvn --batch-mode -DtrimStackTrace=false com.exasol:project-keeper-maven-plugin:verify --projects . |