-
Notifications
You must be signed in to change notification settings - Fork 1
86 lines (81 loc) · 2.57 KB
/
test_on_windows.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
82
83
84
85
86
name: Test on windows
on:
push:
branches:
- main
pull_request:
jobs:
test-on-windows:
runs-on: windows-latest
permissions:
contents: read
defaults:
run:
shell: "bash"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
steps:
- name: Checkout the repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up JDKs
uses: actions/setup-java@v4
with:
distribution: "temurin"
# Java 11 required for test project "my-test-project"
java-version: |
11
17
cache: "maven"
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: "1.22"
- name: Cache Go modules
uses: actions/cache@v4
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Install Go tools
run: go install github.com/google/[email protected]
- name: Build and install
run: mvn --batch-mode -T 1C -DtrimStackTrace=false clean install
- name: Run project-keeper itself
id: build-pk-verify
run: mvn --batch-mode -DtrimStackTrace=false com.exasol:project-keeper-maven-plugin:verify --projects .
- name: Verify Release Artifacts
run: |
print_message() {
local -r message=$1
echo "$message"
echo "$message" >> "$GITHUB_STEP_SUMMARY"
}
print_message "### Release Artifacts"
IFS=$'\n' artifacts_array=($ARTIFACTS)
missing_files=()
for file in "${artifacts_array[@]}";
do
echo "Checking if file $file exists..."
if ! [[ -f "$file" ]]; then
print_message "* ⚠️ \`$file\` does not exist ⚠️"
echo "Content of directory $(dirname "$file"):"
ls "$(dirname "$file")"
missing_files+=("$file")
else
print_message "* \`$file\` ✅"
fi
done
print_message ""
number_of_missing_files=${#missing_files[@]}
if [[ $number_of_missing_files -gt 0 ]]; then
print_message "⚠️ $number_of_missing_files release artifact(s) missing ⚠️"
exit 1
fi
env:
ARTIFACTS: ${{ steps.build-pk-verify.outputs.release-artifacts }}