#415: Decided to test the ParseGraph by the AutoEqualityTest. #211
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
# General workflow to build Metal | |
name: Metal build | |
on: push | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
packages: write | |
strategy: | |
matrix: | |
distribution: [ temurin, corretto ] | |
java-version: [ 11, 17 ] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
# Fetch all history for Sonar analysis | |
fetch-depth: 0 | |
- name: Set up Cache | |
uses: actions/cache@v4 | |
with: | |
path: ~/.m2/repository | |
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} | |
restore-keys: | | |
${{ runner.os }}-maven- | |
- name: Set up JDK | |
uses: actions/setup-java@v4 | |
with: | |
java-version: ${{ matrix.java-version }} | |
distribution: ${{ matrix.distribution }} | |
- name: Build and deploy with Maven and analyze with Sonar | |
# Deploy and analyze only the Corretto 11 build | |
if: matrix.distribution == 'corretto' && matrix.java-version == '17' | |
env: | |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |
# The value of sonar.projectKey is generated by Sonar and needs to map to its internal project name | |
run: mvn -B --update-snapshots -Dmaven.test.failure.ignore=true package org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=parsingdata_metal -Dsonar.organization=parsingdata | |
- name: Build and deploy with Maven | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
if: matrix.distribution == 'corretto' && matrix.java-version == '11' | |
run: mvn -B --update-snapshots -Dmaven.test.failure.ignore=true deploy | |
- name: Build with Maven | |
if: matrix.distribution != 'corretto' | |
run: mvn -B --update-snapshots -Dmaven.test.failure.ignore=true package | |
- name: Upload Code Coverage to Codecov | |
# Upload test coverage results only from the Corretto 11 build | |
if: matrix.distribution == 'corretto' && matrix.java-version == '11' | |
uses: codecov/codecov-action@v4 |