Skip to content

Bump crazy-max/ghaction-import-gpg from 6.0.0 to 6.1.0 #167

Bump crazy-max/ghaction-import-gpg from 6.0.0 to 6.1.0

Bump crazy-max/ghaction-import-gpg from 6.0.0 to 6.1.0 #167

Workflow file for this run

name: test-all
on:
push:
branches-ignore:
- 'dependabot/**' #avoid duplicates: only run the PR, not the commit
tags-ignore:
- 'v*' #avoids rerun existing commit on release
pull_request:
branches:
- 'main'
permissions:
contents: read
packages: write
jobs:
test-java:
runs-on: ubuntu-latest
defaults:
run:
working-directory: java
#if: ${{ false }} # disable for now
steps:
- name: Checkout GitHub repo
uses: actions/checkout@v4
- name: Select Java Version
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '8'
cache: 'maven'
- name: Build and test
run: mvn test -Dmaven.test.failure.ignore=true -U --no-transfer-progress
- name: Publish test report
if: always()
uses: mikepenz/action-junit-report@v4.0.3
with:
check_name: test-report-java
report_paths: '**/target/surefire-reports/TEST-*.xml'
fail_on_failure: 'true'
- if: always()
name: Publish test reports
uses: actions/upload-artifact@v3
with:
name: test-report-java-files
#working-directory does not work here
path: |
java/target/surefire-reports
test-net:
runs-on: ubuntu-latest
defaults:
run:
working-directory: net
#dorny reporter fails if this permissions not set
#however it does not fail in viusal-assert build!!
permissions:
id-token: write
contents: read
checks: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-dotnet@v3.2.0
with:
dotnet-version: '3.1.x'
- name: Run test
run: dotnet test --logger "trx;LogFileName=../../reports/portable-report.trx" PortableTest/PortableTest.csproj
#Shows message in case of some failure (as test report checks are not always produced)
- name: Failure message if needed
if: failure()
run: echo "::error ::There was a build error or test failure, see the log and diff files in the test report artifacts"
#prevents execute on pr or dependabot that fails with "Resource not accessible by integration" due to permissions
- name: Publish test report
if: ${{ always() && github.actor=='javiertuya' }}
uses: dorny/test-reporter@v1
with:
name: test-report-net
#working-directory does not work here
path: net/reports/portable-report.trx
reporter: dotnet-trx
fail-on-error: 'true'
- if: always()
name: Publish test reports files
uses: actions/upload-artifact@v3
with:
name: test-report-net-files
#working-directory does not work here
path: net/reports
publish-java-snapshot:
#avoid publishing PRs and dependabot branches
if: ${{ github.event_name != 'pull_request' && !contains('/head/refs/dependabot/', github.ref) }}
runs-on: ubuntu-latest
defaults:
run:
working-directory: java
steps:
- uses: javiertuya/branch-snapshots-action@v1.2.0
with:
token: ${{ secrets.GITHUB_TOKEN }}
working-directory: java
java-version: '8'
mvn-deploy-args: '-P publish-github -DskipTests=true -Dmaven.test.failure.ignore=false -U --no-transfer-progress'
delete-old-snapshots: true
min-snapshots-to-keep: 4