Skip to content

.github/workflows/test.yaml #2

.github/workflows/test.yaml

.github/workflows/test.yaml #2

Workflow file for this run

on:
workflow_call:
inputs:
environment:
type: string
required: true
workflow_dispatch:
inputs:
environment:
type: string
required: true
default: test
description: "GitHub Actions deployment environment"
permissions:
id-token: write
checks: write
jobs:
test:
environment: ${{ inputs.environment }}
runs-on: ubuntu-22.04
steps:
- name: checkout
uses: actions/[email protected]
- name: setup-java
uses: actions/[email protected]
with:
distribution: 'corretto'
java-version: '21'
cache: 'gradle'
- name: configure-aws-credentials
uses: aws-actions/[email protected]
with:
role-to-assume: "arn:aws:iam::${{ vars.AWS_ACCOUNT_ID }}:role/GitHubActions"
role-session-name: GitHubActions-${{ github.run_id }}-${{ github.run_number }}
aws-region: eu-west-1
- name: gradle-test
id: gradle-test
run: ./gradlew test
- name: test-report
uses: mikepenz/[email protected]
if: ${{ !cancelled() && (steps.gradle-test.outcome == 'success' || steps.gradle-test.outcome == 'failure') }}
with:
report_paths: 'build/test-results/test/TEST-*.xml'