-
Notifications
You must be signed in to change notification settings - Fork 1
154 lines (137 loc) · 4.49 KB
/
test.yml
File metadata and controls
154 lines (137 loc) · 4.49 KB
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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
name: Build and Test
on:
push:
paths-ignore: [ '**/README.md' ]
pull_request:
paths-ignore: [ '**/README.md' ]
# Cancel in progress workflows on pull_requests.
# https://docs.github.com/en/actions/using-jobs/using-concurrency#example-using-a-fallback-value
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Test Default Output
uses: ./
with:
in: .\testing\v2.0.ahk
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Test without GitHub Token
uses: ./
with:
in: .\testing\v2.0.ahk
- name: Test x64 Target
uses: ./
with:
in: .\testing\v2.0.ahk
out: .\output\v2.0_x64.exe
icon: .\testing\icons\test.ico
compression: upx
target: x64
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Test x86 Target
uses: ./
with:
in: .\testing\v2.0.ahk
out: .\output\v2.0_x86.exe
icon: .\testing\icons\test.ico
compression: upx
target: x86
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Test No Compression
uses: ./
with:
in: .\testing\v2.0.ahk
out: .\output\v2.0_x64_uncompressed.exe
icon: .\testing\icons\test.ico
compression: none
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Test No Icon
uses: ./
with:
in: .\testing\v2.0.ahk
out: .\output\v2.0_x64_no_icon.exe
target: x64
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Test ResourceId
uses: ./
with:
in: .\testing\v2.0.ahk
out: .\output\v2.0_x86_resourceid.exe
resourceid: '#5'
target: x86
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Test Specified Tags
uses: ./
with:
in: .\testing\v2.0.ahk
out: .\output\v2.0_x64_tagged.exe
icon: .\testing\icons\test.ico
compression: upx
target: x64
ahk-tag: v2.0.17
ahk2exe-tag: Ahk2Exe1.1.36.02f1
upx-tag: v4.2.4
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Test v1.1 x64
uses: ./
with:
in: .\testing\v1.1.ahk
out: .\output\v1.1_x64.exe
icon: .\testing\icons\test.ico
compression: upx
target: x64
ahk-tag: v1.1.37.02
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Test v1.1 x86
uses: ./
with:
in: .\testing\v1.1.ahk
out: .\output\v1.1_x86.exe
icon: .\testing\icons\test.ico
compression: upx
target: x86
ahk-tag: v1.1.37.02
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Test v2.0 w/ BinMod
uses: ./
with:
in: .\testing\v2.0_binmod.ahk
out: .\output\v2.0_binmod_x64.exe
icon: .\testing\icons\test.ico
compression: upx
target: x64
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Test v1.1 w/ BinMod
uses: ./
with:
in: .\testing\v1.1_binmod.ahk
out: .\output\v1.1_binmod_x64.exe
icon: .\testing\icons\test.ico
compression: upx
target: x64
ahk-tag: v1.1.37.02
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Check for Failed Test
run: |
if(
[System.IO.File]::Exists('.\testing\v2.0.exe') &&
[System.IO.File]::Exists('.\output\v2.0_x64.exe') &&
[System.IO.File]::Exists('.\output\v2.0_x86.exe') &&
[System.IO.File]::Exists('.\output\v2.0_x64_uncompressed.exe') &&
[System.IO.File]::Exists('.\output\v2.0_x64_no_icon.exe') &&
[System.IO.File]::Exists('.\output\v2.0_x86_resourceid.exe') &&
[System.IO.File]::Exists('.\output\v2.0_x64_tagged.exe') &&
[System.IO.File]::Exists('.\output\v1.1_x86.exe') &&
[System.IO.File]::Exists('.\output\v1.1_x64.exe') &&
[System.IO.File]::Exists('.\output\v2.0_x64_binmod.exe') &&
[System.IO.File]::Exists('.\output\v1.1_x64_binmod.exe')
) {
Write-Output "$($PSStyle.Foreground.Green)All Tests Passed!$($PSStyle.Reset)"
} else {
throw "Tests Failed"
}