fix: release-please yoshi type versions #47
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
# | |
# Copyright (c) 2021-2023 - for information on the respective copyright owner | |
# see the NOTICE file and/or the repository https://github.com/carbynestack/amphora. | |
# | |
# SPDX-License-Identifier: Apache-2.0 | |
# | |
name: Build and test artifacts | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- 'master' | |
pull_request: | |
branches: | |
- 'master' | |
jobs: | |
changes: | |
runs-on: ubuntu-22.04 | |
permissions: | |
pull-requests: read | |
outputs: | |
# Expose matched filters as job 'packages' output variable | |
modules: ${{ steps.filter.outputs.changes }} | |
steps: | |
- uses: dorny/paths-filter@v2 | |
id: filter | |
with: | |
filters: | | |
amphora-parent: '(amphora-parent|.github)/**' | |
amphora-common: '(amphora-common|.github)/**' | |
amphora-java-client: '(amphora-java-client|.github)/**' | |
amphora-service: '(amphora-service|.github)/**' | |
test: | |
needs: changes | |
strategy: | |
matrix: | |
module: ${{ fromJSON(needs.changes.outputs.modules) }} | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Set up JDK 8 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '8' | |
distribution: 'temurin' | |
cache: 'maven' | |
- name: Setting up Github Package Repository as Maven Repository | |
uses: s4u/maven-settings-action@v2 | |
with: | |
githubServer: false | |
servers: | | |
[{ | |
"id": "github", | |
"username": "${{ github.actor }}", | |
"password": "${{ secrets.GITHUB_TOKEN }}" | |
}] | |
- name: Build with Maven | |
run: ./mvnw install -pl ${{ matrix.module }} -Dskip.tests --batch-mode --update-snapshots --no-transfer-progress | |
- name: Run Tests | |
run: ./mvnw verify -pl ${{ matrix.module }} --activate-profiles coverage --batch-mode --no-transfer-progress | |
- name: Collect Jacoco reports | |
run: echo ::set-output name=reports::$(find . -regex '.*/target/site/jacoco/jacoco.xml' | tr '\n' ',' | sed 's/.$//') | |
id: jacoco | |
- name: Upload coverage reports | |
uses: codecov/codecov-action@v3 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
files: ${{ steps.jacoco.outputs.reports }} | |
name: ${{ matrix.module }} | |
test-status: | |
runs-on: ubuntu-22.04 | |
needs: test | |
steps: | |
- name: Tests successful | |
if: ${{ !(contains(needs.test.result, 'failure')) }} | |
run: exit 0 | |
- name: Tests failed | |
if: ${{ contains(needs.test.result, 'failure') }} | |
run: exit 1 |