-
-
Notifications
You must be signed in to change notification settings - Fork 34
134 lines (134 loc) · 6.21 KB
/
regression-test-tracking.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
name: "Regression Test - Tracking and Privacy Test"
on:
#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 8,20 * * *'
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-translations.yml'
- '**regression-test-webbkoll.yml'
- '**regression-test-ylt.yml'
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
version: [23]
config: ['SITESPEED_USE_DOCKER=False']
include:
- os: ubuntu-latest
config: 'SITESPEED_USE_DOCKER=True'
version: 23
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
- if: ${{ matrix.os == 'ubuntu-latest' }}
continue-on-error: true
shell: bash
env:
IP2LOCATION_DOWNLOAD_URL: ${{ secrets.IP2LOCATION_DOWNLOAD_URL }}
name: Download IP2LOCATION DB (Using repository secret) - Linux
run: |
wget -q -O data/IP2LOCATION-LITE-DB1.IPV6.BIN $IP2LOCATION_DOWNLOAD_URL
- if: ${{ matrix.os == 'windows-latest' }}
continue-on-error: true
shell: pwsh
env:
IP2LOCATION_DOWNLOAD_URL: ${{ secrets.IP2LOCATION_DOWNLOAD_URL }}
name: Download IP2LOCATION DB (Using repository secret) - Windows
run: |
Invoke-WebRequest -Uri ${env:IP2LOCATION_DOWNLOAD_URL} -OutFile data\IP2LOCATION-LITE-DB1.IPV6.BIN
- if: ${{ matrix.os == 'ubuntu-latest' }}
continue-on-error: true
shell: bash
name: Download Ads database (BlockListProject) - Linux
run: |
wget -q -O data/blocklistproject-ads-nl.txt https://blocklistproject.github.io/Lists/alt-version/ads-nl.txt
- if: ${{ matrix.os == 'windows-latest' }}
continue-on-error: true
shell: pwsh
name: Download Ads database (BlockListProject) - Windows
run: |
Invoke-WebRequest -Uri https://blocklistproject.github.io/Lists/alt-version/ads-nl.txt -OutFile data\blocklistproject-ads-nl.txt
- if: ${{ matrix.os == 'ubuntu-latest' }}
continue-on-error: true
shell: bash
name: Download Tracking database (BlockListProject) - Linux
run: |
wget -q -O data/blocklistproject-tracking-nl.txt https://blocklistproject.github.io/Lists/alt-version/tracking-nl.txt
- if: ${{ matrix.os == 'windows-latest' }}
continue-on-error: true
shell: pwsh
name: Download Tracking database (BlockListProject) - Windows
run: |
Invoke-WebRequest -Uri https://blocklistproject.github.io/Lists/alt-version/tracking-nl.txt -OutFile data\blocklistproject-tracking-nl.txt
- if: ${{ matrix.os == 'ubuntu-latest' }}
continue-on-error: true
shell: bash
name: Download Services database (disconnect) - Linux
run: |
wget -q -O data/disconnect-services.json https://raw.githubusercontent.com/disconnectme/disconnect-tracking-protection/master/services.json
- if: ${{ matrix.os == 'windows-latest' }}
continue-on-error: true
shell: pwsh
name: Download Services database (disconnect) - Windows
run: |
Invoke-WebRequest -Uri https://raw.githubusercontent.com/disconnectme/disconnect-tracking-protection/master/services.json -OutFile data\disconnect-services.json
- 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://webperf.se?webperf-core-test-23 -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://webperf.se?webperf-core-test-23 -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 }}