name: Run Unit Tests

on:
  push:
    branches: [ "master" ]
  pull_request:
    branches: [ "master" ]

permissions:
  contents: read

jobs:
  build_and_test:

    runs-on: ubuntu-latest

    steps:
    - name: Harden Runner
      uses: step-security/harden-runner@248ae51c2e8cc9622ecf50685c8bf7150c6e8813  # v1.4.3
      with:
        egress-policy: block
        disable-telemetry: true
        allowed-endpoints: >
          artifactcache.actions.githubusercontent.com:443
          dl.google.com:443
          github.com:443
          maven.google.com:443
          mp1yacprodeus1file3.blob.core.windows.net:443

    - uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v3
    - name: set up JDK 11
      uses: actions/setup-java@860f60056505705214d223b91ed7a30f173f6142  # v3
      with:
        java-version: '11'
        distribution: 'temurin'
        cache: gradle

    - name: Grant execute permission for gradlew
      run: chmod +x gradlew
    - name: Build with Gradle
      run: ./gradlew build
    - name: Run unit tests
      run: ./gradlew test


Add unit test runner action
Add unit test runner action

This action will run all identity credential unit tests.
