Skip to content

Catch queue errors #133

Catch queue errors

Catch queue errors #133

Workflow file for this run

name: Test running tests using Docker
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: '20.x'
- uses: actions/checkout@v4
- name: Install Chrome
run: |
wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
sudo sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list'
sudo apt-get update
sudo apt-get --only-upgrade install google-chrome-stable
google-chrome --version
- name: Start dependencies
run: docker-compose -f docker-compose.yml up -d
- name: Start the server
run: |
npm install --prefix server
node server/app.js > server.log 2>&1 &
- name: Start the testrunner
run: |
npm install --prefix testrunner
node testrunner/app.js --config test/config/dockertestrunner.yaml > testrunner.log 2>&1 &
- name: Show versions
run: |
docker --version
- name: Get host IP
run: echo "HOST_IP=$(hostname -I | awk '{print $1}')" >> $GITHUB_ENV
- name: Run a test
run: |
git clone https://github.com/sitespeedio/sitespeed.io.git
cd sitespeed.io
npm install
bin/sitespeed.js https://www.wikipedia.org -n 1 --api.hostname 127.0.0.1 --api.location docker --headless --api.json --s3.endpoint "http://${{ env.HOST_IP }}:9000"
- name: Display Server log
if: failure() || success()
run: cat server.log
- name: Display testrunner log
if: failure() || success()
run: cat testrunner.log