forked from oracle/graalvm-reachability-metadata
-
Notifications
You must be signed in to change notification settings - Fork 0
56 lines (51 loc) · 1.83 KB
/
test-changed-metadata.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
51
52
53
54
55
56
name: "Test changed metadata"
on:
pull_request:
branches:
- master
paths:
- 'metadata/**'
- 'tests/**'
- '.github/**'
concurrency:
group: "workflow = ${{ github.workflow }}, ref = ${{ github.event.ref }}, pr = ${{ github.event.pull_request.id }}"
cancel-in-progress: true
jobs:
get-changed-metadata:
name: "📋 Get a list of all changed libraries"
runs-on: "ubuntu-20.04"
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
none-found: ${{ steps.set-matrix.outputs.none-found }}
steps:
- name: "☁️ Checkout repository"
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: "🕸️ Populate matrix"
id: set-matrix
run: |
./gradlew generateMatrixDiffCoordinates -PbaseCommit=${{ github.event.pull_request.base.sha }} -PnewCommit=${{ github.sha }}
test-changed-metadata:
name: "🧪 ${{ matrix.coordinates }} (GraalVM ${{ matrix.version }} ${{ matrix.java-version }} @ ${{ matrix.os }})"
if: needs.get-changed-metadata.result == 'success' && needs.get-changed-metadata.outputs.none-found != 'true'
runs-on: ${{ matrix.os }}
needs: get-changed-metadata
strategy:
fail-fast: false
matrix: ${{ fromJson(needs.get-changed-metadata.outputs.matrix) }}
steps:
- name: "☁️ Checkout repository"
uses: actions/checkout@v2
with:
submodules: 'true'
- name: "🔧 Prepare environment"
uses: ./.github/actions/setup-graalvm
with:
version: ${{ matrix.version }}
java-version: ${{ matrix.java-version }}
components: 'native-image'
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: "🧪 Run '${{ matrix.coordinates }}' tests"
run: |
./gradlew test -Pcoordinates=${{ matrix.coordinates }}