Skip to content
This repository was archived by the owner on Jan 25, 2023. It is now read-only.

Commit 4d75e7b

Browse files
author
Lukas Holzer
authored
tests: add additional structure tests (#817)
* tests: add additional structure tests * chore: test versions with regexp
1 parent f3638e8 commit 4d75e7b

File tree

1 file changed

+91
-0
lines changed

1 file changed

+91
-0
lines changed

focal.yaml

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,24 @@ metadataTest:
2222
value: "en_US.UTF-8"
2323
- key: LC_ALL
2424
value: "en_US.UTF-8"
25+
- key: PATH
26+
value: "/home/linuxbrew/.linuxbrew/bin:\
27+
/opt/buildhome/.swiftenv/bin:\
28+
/opt/buildhome/.swiftenv/shims:\
29+
/opt/buildhome/.php:\
30+
/opt/buildhome/.binrc/bin:\
31+
/opt/buildhome/.yarn/bin:\
32+
/usr/local/rvm/bin:\
33+
/usr/local/sbin:\
34+
/usr/local/bin:\
35+
/usr/sbin:\
36+
/usr/bin:\
37+
/sbin:/bin:\
38+
/opt/buildhome/.cask/bin:\
39+
/opt/buildhome/.gimme/bin:\
40+
/opt/buildhome/.dotnet/tools:\
41+
/opt/buildhome/.dotnet:\
42+
/opt/buildhome/.cargo/bin"
2543
labels:
2644
- key: maintainer
2745
value: Netlify
@@ -34,6 +52,18 @@ fileExistenceTests:
3452
uid: 2500 # buildbot
3553
gid: 2500 # buildbot
3654

55+
- name: Functions install script
56+
path: "/opt/build-bin/run-build-functions.sh"
57+
shouldExist: true
58+
permissions: "-rwxrwxr-x"
59+
60+
- name: "NVM install script"
61+
path: "/opt/buildhome/.nvm/nvm.sh"
62+
shouldExist: true
63+
permissions: "-rw-r--r--"
64+
uid: 2500 # buildbot
65+
gid: 2500 # buildbot
66+
3767
commandTests:
3868
- name: "zstd compression library"
3969
command: "zstd"
@@ -50,7 +80,68 @@ commandTests:
5080
args: ["-v"]
5181
expectedOutput: ["vips-8.9.1-Sun"]
5282

83+
- name: "NODE"
84+
command: "bash"
85+
args:
86+
- "-c"
87+
- |
88+
source /opt/buildhome/.nvm/nvm.sh
89+
echo "NVM: $(nvm --version)"
90+
echo "Node: $(node --version)"
91+
echo "Yarn: $(yarn --version)"
92+
echo "NPM: $(npm --version)"
93+
expectedOutput:
94+
- "Node: v16.16.0"
95+
- "NVM: 0.38.0"
96+
- "Yarn: 1.22.10"
97+
- "NPM: 8.11.0"
98+
99+
- name: hugo
100+
command: "hugo"
101+
args: ["version"]
102+
expectedOutput: ["hugo v0.85.0-724D5DB5"]
103+
104+
- name: lz4 compression
105+
command: "lz4"
106+
args: ["--version"]
107+
expectedError: # they print the version out on stderr
108+
- "LZ4 command line interface 64-bits v1.8.0, by Yann Collet"
109+
110+
- name: "PHP"
111+
command: "php"
112+
args: ["--version"]
113+
expectedOutput:
114+
- PHP 8\.\d+\.\d+ \(cli\)
115+
116+
- name: Golang
117+
command: "bash"
118+
args:
119+
- "-c"
120+
- |
121+
source /opt/build-bin/run-build-functions.sh
122+
install_go 1.18 > /dev/null
123+
go version
124+
expectedOutput:
125+
- "go version go1.18 linux/amd64"
126+
53127
- name: "DOTNet version 6.0 is installed and available at startup"
54128
command: "dotnet"
55129
args: ["--version"]
56130
expectedOutput: ["6.0"]
131+
132+
- name: "Swift"
133+
command: "swiftenv"
134+
args: ["--version"]
135+
expectedOutput: ["swiftenv 1.5.0"]
136+
137+
- name: "Homebrew"
138+
command: "brew"
139+
args: ["--version"]
140+
expectedOutput:
141+
- Homebrew 3\.5\.\d+
142+
143+
- name: "Rustup"
144+
command: "rustup"
145+
args: ["--version"]
146+
expectedOutput:
147+
- rustup 1\.\d+\.\d+

0 commit comments

Comments
 (0)