-
Notifications
You must be signed in to change notification settings - Fork 2
81 lines (72 loc) · 2.54 KB
/
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
name: Test
on:
push:
branches-ignore:
- master
jobs:
test:
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./src/test/resources/
id: simple
with:
file: src/test/resources/test.properties
property: name
- run: '[[ "Darth Vader" == "${{ steps.simple.outputs.value }}" ]]'
- uses: ./src/test/resources/
id: multiline
with:
file: src/test/resources/test.properties
property: affiliation
- run: '[[ "Galactic\nEmpire" == "${{ steps.multiline.outputs.value }}" ]]'
- uses: ./src/test/resources/
id: simple-default
with:
file: src/test/resources/test.properties
property: version
default: 1.0.0
- run: '[[ "1.0.0" == "${{ steps.simple-default.outputs.value }}" ]]'
- uses: ./src/test/resources/
id: multiline-default
with:
file: src/test/resources/test.properties
property: version
default: |-
1
2
3
- run: '[[ "1\n2\n3" == "${{ steps.multiline-default.outputs.value }}" ]]'
- uses: ./src/test/resources/
id: unexisting-file
with:
file: src/test/resources/unexisting.properties
property: name
default: Anakin Skywalker
- run: '[[ "Anakin Skywalker" == "${{ steps.unexisting-file.outputs.value }}" ]]'
- uses: ./src/test/resources/
id: all
with:
file: src/test/resources/test.properties
all: true
- run: '[[ "Darth Vader" == "${{ steps.all.outputs.name }}" ]]'
- run: '[[ "Sith Lord" == "${{ steps.all.outputs.occupation }}" ]]'
- run: '[[ "Galactic\nEmpire" == "${{ steps.all.outputs.affiliation }}" ]]'
- run: '[[ "Luke Skywalker" == "${{ steps.all.outputs.son }}" ]]'
- run: '[[ "1" == "${{ steps.all.outputs.read-java-properties-delimiter }}" ]]'
- run: '[[ "2" == "${{ steps.all.outputs.read-java-properties-delimiter-x }}" ]]'
- run: '[[ "3\n4" == "${{ steps.all.outputs.read-java-properties-delimiter-x-x }}" ]]'
- uses: ./src/test/resources/
id: failure
with:
file: src/test/resources/unexisting.properties
property: name
continue-on-error: true
- run: '[[ "failure" == "${{ steps.failure.outcome }}" ]]'
actions-typing:
name: Validate actions typing
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: typesafegithub/github-actions-typing@v1