Name tests for easier debugging in GitHub Actions (#3026)
This commit is contained in:
parent
68e4925e9c
commit
3527bbe866
|
|
@ -5,12 +5,18 @@ jobs:
|
|||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- run: docker build -t sitespeedio/sitespeed.io .
|
||||
- run: docker build -t sitespeedio/sitespeed.io:slim --file Dockerfile-slim .
|
||||
- run: docker run --rm sitespeedio/sitespeed.io https://www.sitespeed.io -n 1 -b chrome
|
||||
- run: docker run --rm sitespeedio/sitespeed.io https://www.sitespeed.io -n 1 -b firefox
|
||||
- run: docker run --rm sitespeedio/sitespeed.io:slim https://www.sitespeed.io -n 1
|
||||
- run: docker run --cap-add=NET_ADMIN --rm -e REPLAY=true -e LATENCY=100 sitespeedio/sitespeed.io https://www.sitespeed.io -n 1 -b chrome
|
||||
- name: Build Docker containers
|
||||
run: |
|
||||
docker build -t sitespeedio/sitespeed.io .
|
||||
docker build -t sitespeedio/sitespeed.io:slim --file Dockerfile-slim .
|
||||
- name: Run test on default container for Chrome
|
||||
run: docker run --rm sitespeedio/sitespeed.io https://www.sitespeed.io -n 1 -b chrome
|
||||
- name: Run test on default container for Firefox
|
||||
run: docker run --rm sitespeedio/sitespeed.io https://www.sitespeed.io -n 1 -b firefox
|
||||
- name: Run test on slim container
|
||||
run: docker run --rm sitespeedio/sitespeed.io:slim https://www.sitespeed.io -n 1
|
||||
- name: Test WebPageReplay in the default container
|
||||
run: docker run --cap-add=NET_ADMIN --rm -e REPLAY=true -e LATENCY=100 sitespeedio/sitespeed.io https://www.sitespeed.io -n 1 -b chrome
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -9,22 +9,36 @@ jobs:
|
|||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: '12.x'
|
||||
- run: sudo apt-get update
|
||||
- run: sudo apt-get upgrade google-chrome-stable -y
|
||||
- run: google-chrome --version
|
||||
- run: firefox --version
|
||||
- run: npm ci
|
||||
- run: docker-compose -f test/docker-compose.yml up -d
|
||||
- run: bin/sitespeed.js -b firefox -n 2 --budget.configPath test/oldBudget.json --summary --xvfb https://www.sitespeed.io/
|
||||
- run: bin/sitespeed.js --useHash -n 1 --budget.configPath test/budget.json --xvfb https://www.sitespeed.io/#heybaberia
|
||||
- run: bin/sitespeed.js --useAlias start --mobile -n 1 --utc --axe.enable --xvfb https://www.sitespeed.io/
|
||||
- run: bin/sitespeed.js -b firefox --metrics.list --mobile -n 1 https://www.sitespeed.io/ --sustainable.enable --xvfb
|
||||
- run: bin/sitespeed.js --multi -b chrome -n 1 test/prepostscripts/preSample.js https://www.sitespeed.io/documentation/ test/prepostscripts/postSample.js --xvfb
|
||||
- run: xvfb-run node test/runWithoutCli.js
|
||||
- run: bin/sitespeed.js --multi -n 1 https://www.sitespeed.io/ https://www.sitespeed.io/documentation/ --tcpdump
|
||||
- run: bin/sitespeed.js --multi -n 3 test/prepostscripts/multi.js --xvfb
|
||||
- run: bin/sitespeed.js https://www.sitespeed.io/ https://www.google.com -v -n 1 --html.pageSummaryMetrics transferSize.css --html.pageSummaryMetrics requests.httpErrors --html.pageSummaryMetrics score.performance --xvfb
|
||||
- run: bin/sitespeed.js https://www.sitespeed.io/ -v -n 1 --html.summaryBoxes score.performance --html.summaryBoxes timings.firstPaint --xvfb
|
||||
- run: bin/sitespeed.js https://www.sitespeed.io/ -n 1 --graphite.host 127.0.0.1 --xvfb
|
||||
- run: bin/sitespeed.js -b chrome -n 2 --summaryDetail --browsertime.chrome.timeline https://www.sitespeed.io/ --webpagetest.key ${{ secrets.WPT_KEY }} --xvfb
|
||||
- name: Install dependencies and seup environment
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get upgrade google-chrome-stable -y
|
||||
google-chrome --version
|
||||
firefox --version
|
||||
npm ci
|
||||
docker-compose -f test/docker-compose.yml up -d
|
||||
- name: Test old budget
|
||||
run: bin/sitespeed.js -b firefox -n 2 --budget.configPath test/oldBudget.json --summary --xvfb https://www.sitespeed.io/
|
||||
- name: Test new budget file
|
||||
run: bin/sitespeed.js --useHash -n 1 --budget.configPath test/budget.json --xvfb https://www.sitespeed.io/#heybaberia
|
||||
- name: Use AXE
|
||||
run: bin/sitespeed.js --useAlias start --mobile -n 1 --utc --axe.enable --xvfb https://www.sitespeed.io/
|
||||
- name: Use Fireefox with --mobile
|
||||
run: bin/sitespeed.js -b firefox --metrics.list --mobile -n 1 https://www.sitespeed.io/ --sustainable.enable --xvfb
|
||||
- name: Test --multi
|
||||
run: bin/sitespeed.js --multi -b chrome -n 1 test/prepostscripts/preSample.js https://www.sitespeed.io/documentation/ test/prepostscripts/postSample.js --xvfb
|
||||
- name: Test --multi and --tcpdump
|
||||
run: bin/sitespeed.js --multi -n 1 https://www.sitespeed.io/ https://www.sitespeed.io/documentation/ --tcpdump --xvfb
|
||||
- name: Test --multi with one file
|
||||
run: bin/sitespeed.js --multi -n 3 test/prepostscripts/multi.js --xvfb
|
||||
- name: Test setting HTML output pageSummaries
|
||||
run: bin/sitespeed.js https://www.sitespeed.io/ https://www.google.com -v -n 1 --html.pageSummaryMetrics transferSize.css --html.pageSummaryMetrics requests.httpErrors --html.pageSummaryMetrics score.performance --xvfb
|
||||
- name: Test setting HTML output summary boxes
|
||||
run: bin/sitespeed.js https://www.sitespeed.io/ -v -n 1 --html.summaryBoxes score.performance --html.summaryBoxes timings.firstPaint --xvfb
|
||||
- name: Run test with Graphite
|
||||
run: bin/sitespeed.js https://www.sitespeed.io/ -n 1 --graphite.host 127.0.0.1 --xvfb
|
||||
- name: Run test without a CLI
|
||||
run: xvfb-run node test/runWithoutCli.js
|
||||
- name: Run tests on WebPageTest
|
||||
run: bin/sitespeed.js -b chrome -n 2 --summaryDetail --browsertime.chrome.timeline https://www.sitespeed.io/ --webpagetest.key ${{ secrets.WPT_KEY }} --xvfb
|
||||
|
||||
|
|
@ -9,6 +9,9 @@ jobs:
|
|||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: '12.x'
|
||||
- run: sudo safaridriver --enable
|
||||
- run: npm ci
|
||||
- run: bin/sitespeed.js -b safari https://www.sitespeed.io/
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
sudo safaridriver --enable
|
||||
npm ci
|
||||
- name: Run test
|
||||
run: bin/sitespeed.js -b safari https://www.sitespeed.io/
|
||||
|
|
|
|||
|
|
@ -12,12 +12,15 @@ jobs:
|
|||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
- run: npm ci
|
||||
- run: sudo apt-get update
|
||||
- run: sudo apt-get upgrade google-chrome-stable -y
|
||||
- run: google-chrome --version
|
||||
- run: firefox --version
|
||||
- run: npm run build:css && test -z "$(git status --porcelain lib/plugins/html/assets/css/index.css)"
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
npm ci
|
||||
sudo apt-get update
|
||||
sudo apt-get upgrade google-chrome-stable -y
|
||||
google-chrome --version
|
||||
firefox --version
|
||||
- name: Verify clean CSS
|
||||
run: npm run build:css && test -z "$(git status --porcelain lib/plugins/html/assets/css/index.css)"
|
||||
- name: Run unit tests
|
||||
uses: GabrielBB/xvfb-action@v1.2
|
||||
with:
|
||||
|
|
|
|||
|
|
@ -13,6 +13,8 @@ jobs:
|
|||
env:
|
||||
CHROMEDRIVER_SKIP_DOWNLOAD: true
|
||||
GECKODRIVER_SKIP_DOWNLOAD: true
|
||||
- name: Install dependencies
|
||||
run: choco install microsoft-edge
|
||||
#- name: Run Edge test
|
||||
# run: node bin/sitespeed.js -b edge https://www.sitespeed.io/
|
||||
# shell: cmd
|
||||
|
|
|
|||
Loading…
Reference in New Issue