Skip to content

Commit

Permalink
Merge branch 'main' into npm-cache
Browse files Browse the repository at this point in the history
  • Loading branch information
7h3Rabbit authored Mar 4, 2025
2 parents 91441e0 + a3eb1b7 commit e3bf92f
Show file tree
Hide file tree
Showing 57 changed files with 2,378 additions and 693 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/manual-start-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
test:
description: 'Test to run, comma separated list of numbers'
required: true
default: '1,2,4,5,6,7,9,10,15,20,21,22,23,24,25,26,27'
default: '1,2,4,5,6,7,9,10,15,20,21,22,23,24,25,26,27,28,29'
type: string
details:
description: 'Setting general.review.details'
Expand All @@ -22,6 +22,11 @@ on:
required: true
default: 'false'
type: string
improve:
description: 'Setting general.review.improve-only'
required: true
default: 'true'
type: string
env:
TEST_TAG: webperfse/webperf-core:test
jobs:
Expand All @@ -42,5 +47,5 @@ jobs:
tags: ${{ env.TEST_TAG }}
- name: Test ${{ github.event.inputs.test }} for ${{ github.event.inputs.url }}
run: |
testresult=$(docker run ${{ env.TEST_TAG }} python default.py -t ${{ github.event.inputs.test }} -r --setting general.review.details=${{ github.event.inputs.details }} --setting general.review.data=${{ github.event.inputs.data }} -u ${{ github.event.inputs.url }})
testresult=$(docker run ${{ env.TEST_TAG }} python default.py -t ${{ github.event.inputs.test }} -r --setting general.review.details=${{ github.event.inputs.details }} --setting general.review.data=${{ github.event.inputs.data }} --setting general.review.improve-only=${{ github.event.inputs.improve }} -u ${{ github.event.inputs.url }})
echo "$testresult"
4 changes: 0 additions & 4 deletions .github/workflows/prep-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@ on:
paths:
- "**software-full.json"
- "Dockerfile"
schedule:
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#onschedule
# * is a special character in YAML so you have to quote this string
- cron: "30 6 1 * *"
jobs:
build:
runs-on: ubuntu-latest
Expand Down
9 changes: 9 additions & 0 deletions .github/workflows/regression-test-docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,15 @@ jobs:
run: |
testresult=$(docker run ${{ env.TEST_TAG }} python default.py -t 27 -r -i defaults/sites.json)
echo "$testresult"
if [[ "$testresult" != *"Standards:"* ]]; then
echo "Error: WebPerf-core testresult is NOT returning expected review"
exit 1
fi
- name: Check if webperf_core can run Test 28
if: always()
run: |
testresult=$(docker run ${{ env.TEST_TAG }} python default.py -t 28 -r -i defaults/sites.json)
echo "$testresult"
if [[ "$testresult" != *"Standards:"* ]]; then
echo "Error: WebPerf-core testresult is NOT returning expected review"
exit 1
Expand Down
81 changes: 81 additions & 0 deletions .github/workflows/regression-test-lint-html.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
name: "Regression Test - HTML Linting Test"
on:
workflow_dispatch:
push:
paths-ignore:
- '**.md'
- '**software-full.json'
- '**software-sources.json'
- '**update-software.yml'
- '**update_software_helper.py'
- '**software-rules.json'
- 'Dockerfile'
- '**regression-test-404.yml'
- '**regression-test-a11y-statement.yml'
- '**regression-test-css.yml'
- '**regression-test-docker-image.yml'
- '**regression-test-email.yml'
- '**regression-test-energy-efficiency.yml'
- '**regression-test-google-lighthouse-based.yml'
- '**regression-test-html.yml'
- '**regression-test-http.yml'
- '**regression-test-lint-css.yml'
- '**regression-test-pa11y.yml'
- '**regression-test-sitespeed-browsertime-har.yml'
- '**regression-test-sitespeed.yml'
- '**regression-test-software.yml'
- '**regression-test-standard-files.yml'
- '**regression-test-tracking.yml'
- '**regression-test-translations.yml'
- '**regression-test-webbkoll.yml'
- '**regression-test-ylt.yml'
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
config: ['SITESPEED_USE_DOCKER=False']
version: [28]
include:
- os: ubuntu-latest
config: 'SITESPEED_USE_DOCKER=True'
version: 28
steps:
- name: Check out repository code
uses: actions/checkout@v4
- name: Setup python
uses: actions/setup-python@v5
with:
python-version: '3.13' # Version range or exact version of a Python version to use, using SemVer's version range syntax
architecture: 'x64' # optional x64 or x86. Defaults to x64 if not specified
- name: Setup dependencies using pip
run: pip install -r requirements.txt
- name: Java Version
run: java -version
- name: Setup Node.js (v4 version 20.x)
uses: actions/setup-node@v4
with:
node-version: '20.x'
- if: ${{ matrix.os == 'ubuntu-latest' }}
shell: bash
name: Setup Google Chrome browser (ONLY used for Sitespeed)
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: Setup npm packages
run: npm install --omit=dev
timeout-minutes: 30
- if: ${{ matrix.os == 'ubuntu-latest' }}
name: RUNNING TEST - LINUX
run: |
python default.py -t ${{ matrix.version }} -r -u https://msb.se?webperf-core-test-28 -o data/testresult-${{ matrix.version }}.json --setting ${{ matrix.config }} --setting tests.sitespeed.xvfb=true --setting general.cache.use=true --setting general.cache.max-age=5256000 --setting general.cache.folder=unittests
python .github/workflows/verify_result.py -t ${{ matrix.version }}
- if: ${{ matrix.os == 'windows-latest' }}
name: RUNNING TEST - WINDOWS
run: |
python default.py -t ${{ matrix.version }} -r -u https://msb.se?webperf-core-test-28 -o data\testresult-${{ matrix.version }}.json --setting ${{ matrix.config }} --setting general.cache.use=true --setting general.cache.max-age=5256000 --setting general.cache.folder=unittests
python .github\workflows\verify_result.py -t ${{ matrix.version }}
92 changes: 92 additions & 0 deletions .github/workflows/regression-test-lint-js.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
name: "Regression Test - JS Linting Test"
on:
workflow_dispatch:
push:
paths-ignore:
- '**.md'
- '**software-full.json'
- '**software-sources.json'
- '**update-software.yml'
- '**update_software_helper.py'
- '**software-rules.json'
- 'Dockerfile'
- '**regression-test-404.yml'
- '**regression-test-a11y-statement.yml'
- '**regression-test-css.yml'
- '**regression-test-docker-image.yml'
- '**regression-test-email.yml'
- '**regression-test-energy-efficiency.yml'
- '**regression-test-google-lighthouse-based.yml'
- '**regression-test-html.yml'
- '**regression-test-http.yml'
- '**regression-test-lint-css.yml'
- '**regression-test-lint-html.yml'
- '**regression-test-pa11y.yml'
- '**regression-test-sitespeed-browsertime-har.yml'
- '**regression-test-sitespeed.yml'
- '**regression-test-software.yml'
- '**regression-test-standard-files.yml'
- '**regression-test-tracking.yml'
- '**regression-test-translations.yml'
- '**regression-test-webbkoll.yml'
- '**regression-test-ylt.yml'
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
config: ['SITESPEED_USE_DOCKER=False']
version: [29]
include:
- os: ubuntu-latest
config: 'SITESPEED_USE_DOCKER=True'
version: 29
steps:
- name: Check out repository code
uses: actions/checkout@v4
- name: Setup python
uses: actions/setup-python@v5
with:
python-version: '3.13' # Version range or exact version of a Python version to use, using SemVer's version range syntax
architecture: 'x64' # optional x64 or x86. Defaults to x64 if not specified
- name: Setup dependencies using pip
run: pip install -r requirements.txt
- name: Java Version
run: java -version
- name: Setup Node.js (v4 version 20.x)
uses: actions/setup-node@v4
with:
node-version: '20.x'
- if: ${{ matrix.os == 'ubuntu-latest' }}
shell: bash
name: Setup Google Chrome browser (ONLY used for Sitespeed)
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: Setup npm packages
run: npm install --omit=dev
timeout-minutes: 30
- if: ${{ matrix.os == 'ubuntu-latest' }}
name: RUNNING TEST - LINUX (no-errors)
run: |
python default.py -t ${{ matrix.version }} -r -u https://webperf.se?webperf-core-test-29-no-errors -o data/testresult-${{ matrix.version }}.json --setting ${{ matrix.config }} --setting tests.sitespeed.xvfb=true --setting general.cache.use=true --setting general.cache.max-age=5256000 --setting general.cache.folder=unittests
python .github/workflows/verify_result.py -t ${{ matrix.version }}
- if: ${{ matrix.os == 'windows-latest' }}
name: RUNNING TEST - WINDOWS (no-errors)
run: |
python default.py -t ${{ matrix.version }} -r -u https://webperf.se?webperf-core-test-29-no-errors -o data\testresult-${{ matrix.version }}.json --setting ${{ matrix.config }} --setting general.cache.use=true --setting general.cache.max-age=5256000 --setting general.cache.folder=unittests
python .github\workflows\verify_result.py -t ${{ matrix.version }}
- if: ${{ matrix.os == 'ubuntu-latest' }}
name: RUNNING TEST - LINUX (with-errors)
run: |
python default.py -t ${{ matrix.version }} -r -u https://webperf.se?webperf-core-test-29-with-errors -o data/testresult-${{ matrix.version }}.json --setting ${{ matrix.config }} --setting tests.sitespeed.xvfb=true --setting general.cache.use=true --setting general.cache.max-age=5256000 --setting general.cache.folder=unittests
python .github/workflows/verify_result.py -t ${{ matrix.version }}
- if: ${{ matrix.os == 'windows-latest' }}
name: RUNNING TEST - WINDOWS (with-errors)
run: |
python default.py -t ${{ matrix.version }} -r -u https://webperf.se?webperf-core-test-29-with-errors -o data\testresult-${{ matrix.version }}.json --setting ${{ matrix.config }} --setting general.cache.use=true --setting general.cache.max-age=5256000 --setting general.cache.folder=unittests
python .github\workflows\verify_result.py -t ${{ matrix.version }}
8 changes: 1 addition & 7 deletions .github/workflows/regression-test-pa11y.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
# os: [ubuntu-latest, windows-latest]
os: [ubuntu-20.04, windows-latest]
os: [windows-latest]
version: [18]
steps:
- name: Check out repository code
Expand All @@ -56,11 +55,6 @@ jobs:
run: npm ci --only=production
timeout-minutes: 30
# Havn't yet been able to start Google Chrome in headless mode in pa11y since move to Chrome in Pa11y 5
- if: ${{ matrix.os == 'ubuntu-20.04' }}
name: RUNNING TEST - LINUX
run: |
python default.py -t ${{ matrix.version }} -r -i defaults/sites.json -o data/testresult-${{ matrix.version }}.json
python .github/workflows/verify_result.py -t ${{ matrix.version }}
- if: ${{ matrix.os == 'windows-latest' }}
name: RUNNING TEST - WINDOWS
run: |
Expand Down
7 changes: 1 addition & 6 deletions .github/workflows/regression-test-webbkoll.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
os: [windows-latest]
version: [20]
steps:
- name: Check out repository code
Expand All @@ -45,11 +45,6 @@ jobs:
architecture: 'x64' # optional x64 or x86. Defaults to x64 if not specified
- name: Setup dependencies using pip
run: pip install -r requirements.txt
- if: ${{ matrix.os == 'ubuntu-latest' }}
name: RUNNING TEST - LINUX
run: |
python default.py -t ${{ matrix.version }} -r -i defaults/sites.json -o data/testresult-${{ matrix.version }}.json
python .github/workflows/verify_result.py -t ${{ matrix.version }}
- if: ${{ matrix.os == 'windows-latest' }}
name: RUNNING TEST - WINDOWS
run: |
Expand Down
11 changes: 1 addition & 10 deletions .github/workflows/regression-test-ylt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-22.04, windows-latest]
os: [windows-latest]
version: [17]
steps:
- name: Check out repository code
Expand All @@ -54,18 +54,9 @@ jobs:
- name: Setup node dependencies (ONLY used for Yellow Lab Tools)
run: npm install -g node-gyp
timeout-minutes: 30
- if: matrix.os == 'ubuntu-22.04'
name: Setup libjpeg and fontconfig (ONLY used for Yellow Lab Tools) - LINUX
run: sudo apt-get install libjpeg-dev libfontconfig
shell: bash
- name: Setup npm packages
run: npm ci --only=production
timeout-minutes: 30
- if: ${{ matrix.os == 'ubuntu-22.04' }}
name: RUNNING TEST - LINUX
run: |
python default.py -t ${{ matrix.version }} -r -i defaults/sites.json -o data/testresult-${{ matrix.version }}.json
python .github/workflows/verify_result.py -t ${{ matrix.version }}
- if: ${{ matrix.os == 'windows-latest' }}
name: RUNNING TEST - WINDOWS
run: |
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM sitespeedio/sitespeed.io:36.2.5
FROM sitespeedio/sitespeed.io:36.4.1

USER root

Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ Add a interesting ingress here.
* [Validate HTML (W3C)](./docs/tests/html.md)
* [Validate CSS (W3C)](./docs/tests/css.md)
* [Validate CSS (Linting)](./docs/tests/css-linting.md)
* [Validate JS (Linting)](./docs/tests/js-linting.md)
* [Security, data-protecting & Integrity (Webbkoll)](./docs/tests/webbkoll.md)
* [Frontend quality (YellowLab Tools)](./docs/tests/yellowlab.md)
* [Energy Efficiency](./docs/tests/energy-efficiency.md)
Expand Down
2 changes: 2 additions & 0 deletions default.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@ def show_test_help(global_translation):
print(global_translation('TEXT_TEST_VALID_ARGUMENTS_SOFTWARE'))
print(global_translation('TEXT_TEST_VALID_ARGUMENTS_A11Y_STATEMENT'))
print(global_translation('TEXT_TEST_VALID_ARGUMENTS_CSS_LINT'))
print(global_translation('TEXT_TEST_VALID_ARGUMENTS_HTML_LINT'))
print(global_translation('TEXT_TEST_VALID_ARGUMENTS_JS_LINT'))
sys.exit()


Expand Down
59 changes: 59 additions & 0 deletions defaults/a11y-overlays.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
{
"overlays": [
{
"name": "AccessiBe",
"description": "Sometimes referred to as Accessiway?",
"website": "https://accessibe.com",
"urls": [
{
"url": "https://acsbapp.com/"
},
{
"url": "https://cdn.acsbapp.com"
},
{
"url": "https://accesswidget-log-receiver.acsbapp.com/"
}
]
},
{
"name": "EqualWeb",
"description": "",
"website": "https://www.equalweb.com",
"urls": [
{
"url": "https://aacdn.nagich.com/"
},
{
"url": "https://ocr.nagich.com/"
}
]
},
{
"name": "UserWay",
"description": "",
"website": "https://userway.org",
"urls": [
{
"url": "https://cdn.userway.org/"
},
{
"url": "https://api.userway.org/"
}
]
},
{
"name": "AudioEye",
"description": "",
"website": "https://www.audioeye.com",
"urls": [
{
"url": "https://wsmcdn.audioeye.com/"
},
{
"url": "https://wsv3cdn.audioeye.com/"
}
]
}
]
}
Loading

0 comments on commit e3bf92f

Please sign in to comment.