forked from openwallet-foundation-labs/identity-credential
-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (43 loc) · 1.46 KB
/
unit-test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
name: Run Unit Tests
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
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:
# We are in audit mode on egress until the following issue is fixed:
# https://github.com/step-security/harden-runner/issues/83
# Things hosted on the Microsoft CDN end up on different hostnames,
# and we should allow-list *.blob.core.windows.net. However, we cannot
# really do that so are stuck with audit mode for now.
egress-policy: audit
disable-telemetry: true
allowed-endpoints: >
artifactcache.actions.githubusercontent.com:443
dl.google.com:443
github.com:443
maven.google.com:443
services.gradle.org:443
downloads.gradle-dn.com:443
jcenter.bintray.com: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 -x test
- name: Run unit tests
run: ./gradlew test