-
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
fe60429
commit 511193d
Showing
5 changed files
with
87 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
name: Test the GUI | ||
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 --logging.verbose true > testrunner.log 2>&1 & | ||
- name: Install sitespeed.io globally | ||
run: npm install sitespeed.io -g | ||
- name: Show versions | ||
run: | | ||
docker --version | ||
sitespeed.io --version | ||
- name: Run a test | ||
run: | | ||
git clone https://github.com/sitespeedio/sitespeed.io.git | ||
cd sitespeed.io | ||
npm install | ||
bin/sitespeed.js ../test/scripts/addatest.mjs --multi -n 1 --headless | ||
- name: Display Server log | ||
if: failure() || success() | ||
run: cat server.log | ||
- name: Display testrunner log | ||
if: failure() || success() | ||
run: cat testrunner.log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
/** | ||
* @param {import('browsertime').BrowsertimeContext} context | ||
* @param {import('browsertime').BrowsertimeCommands} commands | ||
*/ | ||
export default async function (context, commands) { | ||
await commands.navigate('http://127.0.0.1:3000/'); | ||
await commands.addText.byId('https://www.wikipedia.org', 'url'); | ||
await commands.select.selectByIdAndValue('iterations', 1); | ||
await commands.mouse.singleClick.byXpath('/html/body/section/div/div[2]/ul/li[2]'); | ||
await commands.wait.byId('commandlinearea', 5000); | ||
await commands.addText.byId('--headless', 'commandlinearea'); | ||
await commands.measure.start('RunTest'); | ||
await commands.click.byIdAndWait('submittest'); | ||
await commands.wait.byXpath('/html/body/div[2]/h1',30000); | ||
return commands.measure.stop(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters