File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -142,9 +142,14 @@ jobs:
142142 with :
143143 node-version : 20
144144 cache : " npm"
145- - name : Install dependencies (on Rocky linux)
145+ - name : Configure Rocky linux
146146 if : matrix.container.image == 'rockylinux:9'
147- run : dnf install -y sudo gcc gcc-c++ make git nss dbus xorg-x11-server-Xvfb
147+ run : |
148+ # Install dependencies
149+ dnf install -y sudo gcc gcc-c++ make git nss dbus xorg-x11-server-Xvfb
150+ # Add a non-admin sudoer user
151+ adduser compass
152+ echo "compass ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
148153
149154 - name : Cache downloads
150155 uses : actions/cache@v4
@@ -189,4 +194,7 @@ jobs:
189194 # Exposing token to prevent update server from being rate limited
190195 GITHUB_TOKEN : ${{ github.token }}
191196 working-directory : packages/compass-smoke-tests
192- run : npm start -- --package ${{ matrix.package }} --tests ${{ matrix.test }}
197+ # Switching to a non-root user if necessary
198+ run : |
199+ ${{ matrix.container.image == 'rockylinux:9' && 'su compass' || '' }}
200+ npm start -- --package ${{ matrix.package }} --tests ${{ matrix.test }}
You can’t perform that action at this time.
0 commit comments