Move to GitHub Actions (#3028)
* Move to GitHub Actions * rename travis and show browser versions
This commit is contained in:
parent
f9464002b7
commit
4eb2aad812
|
|
@ -9,14 +9,17 @@ jobs:
|
|||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: '12.x'
|
||||
- name: Install sitespeed.io
|
||||
run: npm ci
|
||||
- name: Install dependencies and seup environment
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get upgrade google-chrome-stable -y
|
||||
docker-compose -f test/docker-compose.yml up -d
|
||||
- name: Browser versions
|
||||
run: |
|
||||
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
|
||||
|
|
|
|||
|
|
@ -13,10 +13,12 @@ jobs:
|
|||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
run: |
|
||||
npm ci
|
||||
sudo apt-get update
|
||||
sudo apt-get upgrade google-chrome-stable -y
|
||||
- name: Browser versions
|
||||
run: |
|
||||
google-chrome --version
|
||||
firefox --version
|
||||
- name: Verify clean CSS
|
||||
|
|
@ -24,4 +26,4 @@ jobs:
|
|||
- name: Run unit tests
|
||||
uses: GabrielBB/xvfb-action@v1.2
|
||||
with:
|
||||
run: npm run travis
|
||||
run: npm run lint-and-unit
|
||||
|
|
|
|||
83
.travis.yml
83
.travis.yml
|
|
@ -1,83 +0,0 @@
|
|||
language: node_js
|
||||
node_js: 12
|
||||
matrix:
|
||||
allow_failures:
|
||||
- os: osx
|
||||
include:
|
||||
- name: "Unit tests on Linux"
|
||||
sudo: required
|
||||
dist: bionic
|
||||
before_script:
|
||||
- export DISPLAY=:99.0
|
||||
- /sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -ac -screen 0 1600x1024x16
|
||||
script:
|
||||
- npm run travis
|
||||
- npm run build:css && test -z "$(git status --porcelain lib/plugins/html/assets/css/index.css)"
|
||||
- name: "Docker on Linux"
|
||||
sudo: required
|
||||
dist: bionic
|
||||
before_script:
|
||||
addons:
|
||||
install:
|
||||
- docker build -t sitespeedio/sitespeed.io .
|
||||
- docker build -t sitespeedio/sitespeed.io:slim --file Dockerfile-slim .
|
||||
script:
|
||||
- docker run --rm sitespeedio/sitespeed.io https://www.sitespeed.io -n 1 -b chrome
|
||||
- docker run --rm sitespeedio/sitespeed.io https://www.sitespeed.io -n 1 -b firefox
|
||||
- docker run --rm sitespeedio/sitespeed.io:slim https://www.sitespeed.io -n 1
|
||||
- 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: "Browser tests on Linux"
|
||||
- name: "Browser tests on Linux"
|
||||
sudo: required
|
||||
dist: bionic
|
||||
before_script:
|
||||
- export DISPLAY=:99.0
|
||||
- /sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -ac -screen 0 1600x1024x16
|
||||
- docker-compose -f test/docker-compose.yml up -d
|
||||
env:
|
||||
- secure: ZCqHD+/PhHNVFWoqir66Xd9YeJRcTHDJYvNL9j4+GTKDEI1h94twhAjQ7Z9DhlCnXwL1lsfEcIjvNCWd3ir/FNy2oZsUzu6kMpFF/niugurFbS551moJ2ObNEfOdj93/sTo4UWH2MZouC9eYeuj1vNYbAev6wBIptL95X/ArldQ=
|
||||
- secure: ZmEirO6J+rY+6T6eQWRNxqiqRNOYJktqQWaeUDR6WvzoR80oPdgKoNRS012dk4aCGr2+Dxf/KP6Iu2qbDE3YP3QD7PhoexicTVB6MTl81hZfX/eN0lt4lZknTYtjnAAWQB/aWAM6OVLjh8rAzq9PTBzl5EtAeMMJWmnhz6r+cLc=
|
||||
script:
|
||||
- bin/sitespeed.js -b firefox -n 2 --budget.configPath test/oldBudget.json --summary https://www.sitespeed.io/
|
||||
- bin/sitespeed.js --useHash -n 1 --budget.configPath test/budget.json https://www.sitespeed.io/#heybaberia
|
||||
- bin/sitespeed.js --useAlias start --mobile -n 1 --utc --axe.enable https://www.sitespeed.io/
|
||||
- bin/sitespeed.js -b firefox --metrics.list --mobile -n 1 https://www.sitespeed.io/ --sustainable.enable
|
||||
- bin/sitespeed.js --multi -b chrome -n 1 test/prepostscripts/preSample.js https://www.sitespeed.io/documentation/ test/prepostscripts/postSample.js
|
||||
- 'if [ "$TRAVIS_SECURE_ENV_VARS" = "true" ]; then bin/sitespeed.js -b chrome -n 2 --summaryDetail --browsertime.chrome.timeline https://www.sitespeed.io/ --webpagetest.key $WPTKEY; fi'
|
||||
- node test/runWithoutCli.js
|
||||
- bin/sitespeed.js --multi -n 1 https://www.sitespeed.io/ https://www.sitespeed.io/documentation/ --tcpdump
|
||||
- bin/sitespeed.js --multi -n 3 test/prepostscripts/multi.js
|
||||
- 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
|
||||
- bin/sitespeed.js https://www.sitespeed.io/ -v -n 1 --html.summaryBoxes score.performance --html.summaryBoxes timings.firstPaint
|
||||
- bin/sitespeed.js https://www.sitespeed.io/ -n 1 --graphite.host 127.0.0.1
|
||||
- name: "Browser test on OS X"
|
||||
os: osx
|
||||
osx_image: xcode11.3
|
||||
before_install: sudo safaridriver --enable
|
||||
script:
|
||||
- bin/sitespeed.js -b safari https://www.sitespeed.io/
|
||||
- name: "Browser tests on Windows"
|
||||
os: windows
|
||||
before_install:
|
||||
- choco install chromedriver
|
||||
# See https://www.gep13.co.uk/blog/chocolatey-error-hashes-do-not-match#so-why-did-this-go-wrong
|
||||
- choco install googlechrome --ignore-checksums
|
||||
script:
|
||||
- bin/sitespeed.js -b chrome https://www.sitespeed.io/ --cpu
|
||||
cache:
|
||||
apt: true
|
||||
addons:
|
||||
apt:
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
firefox: latest
|
||||
chrome: stable
|
||||
before_install:
|
||||
- firefox --version 2>/dev/null
|
||||
- google-chrome --product-version
|
||||
- python --version
|
||||
notifications:
|
||||
slack:
|
||||
on_success: change
|
||||
on_failure: always
|
||||
secure: 3Ca5MzTVkgeZDKk7xuiXnGnl0u4UgBXQtn72xIBwb1nked0JSdwZ4MVgNTVRTlIvwbTdTaYcTo7Pm4+rSrfFx2T1juawq3TkUStJ4AmZHH2gGrAr46snEauWCovHmgo3mMAOwz3fJknz8VfIu7WmtiCH/GO9h20aNmjE1UT3pTE=
|
||||
|
|
@ -1,6 +1,10 @@
|
|||
# sitespeed.io
|
||||
|
||||
[![Build status][travis-image]][travis-url]
|
||||

|
||||

|
||||

|
||||

|
||||

|
||||
[![Downloads][downloads-image]][downloads-url]
|
||||
[![Docker][docker-image]][docker-url]
|
||||
[![Stars][stars-image]][stars-url]
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@
|
|||
"pug-lint": "pug-lint lib/plugins/html/templates",
|
||||
"test": "mocha",
|
||||
"check-licenses": "tools/check-licenses.js",
|
||||
"travis": "npm run eslint-check && npm run lint && npm run test",
|
||||
"lint-and-unit": "npm run eslint-check && npm run lint && npm run test",
|
||||
"build:css": "node-sass lib/plugins/html/src/sass/main.scss > lib/plugins/html/assets/css/index.css && cleancss -o lib/plugins/html/assets/css/index.min.css lib/plugins/html/assets/css/index.css && rm lib/plugins/html/assets/css/index.css",
|
||||
"generate:assets": "mkdir -p assets/$npm_package_version && cp -R lib/plugins/html/assets/ assets/$npm_package_version/"
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in New Issue