-
Notifications
You must be signed in to change notification settings - Fork 2
93 lines (91 loc) · 2.73 KB
/
test-common-tooling.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
87
88
89
90
91
92
93
---
name: Test Common Tooling
on:
pull_request:
paths:
- 'common-tooling/action.yml'
jobs:
test-common-tooling:
strategy:
fail-fast: false
matrix:
label: ["ubuntu-latest", "gcp-core-2-default", "arm64"]
runs-on: ${{ matrix.label }}
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
- name: Install if required common software tooling
uses: ./common-tooling
- name: Check that installed software is available
run: |
if ! command -v node &> /dev/null
then
echo "node could not be found"
exit 1
else
node --version
fi
if ! command -v yarn &> /dev/null
then
echo "yarn could not be found"
exit 1
else
yarn --version
fi
docker_buildx_count=$(docker buildx 2>&1 | grep -c "docker buildx")
if [[ $docker_buildx_count -eq 0 ]]
then
echo "docker buildx could not be found"
exit 1
else
docker buildx version
fi
if ! command -v java &> /dev/null
then
echo "java could not be found"
exit 1
else
java --version
fi
if ! command -v mvn &> /dev/null
then
echo "mvn could not be found"
exit 1
else
mvn --version
fi
if ! command -v python3 &> /dev/null
then
echo "python3 could not be found"
exit 1
else
python --version
fi
if ! command -v python &> /dev/null
then
echo "python could not be found"
exit 1
else
python --version
fi
- name: Install nothing, just for testing
uses: ./common-tooling
with:
node-enabled: "false"
yarn-enabled: "false"
python-enabled: "false"
java-enabled: "false"
qemu-enabled: "false"
buildx-enabled: "false"
- name: Install and overwrite common software tooling
uses: ./common-tooling
with:
overwrite: "true"
- name: Install and overwrite common software tooling
uses: ./common-tooling
with:
node-version: 20 # see https://github.com/actions/setup-node#supported-version-syntax for supported syntax
java-version: 20 # see https://github.com/marketplace/actions/setup-java-jdk#supported-version-syntax for supported syntax
java-distribution: adopt # see https://github.com/marketplace/actions/setup-java-jdk#supported-distributions for supported distros
python-version: 3 # see https://github.com/actions/setup-python#supported-version-syntax for supported syntax
overwrite: 'true'