Skip to content

Merge pull request #262 from Webperf-se/softis #7

Merge pull request #262 from Webperf-se/softis

Merge pull request #262 from Webperf-se/softis #7

name: "Regression Test - Tracking and Privacy (Beta) 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 * * *'
push:
paths-ignore:
- '**.md'
- 'software-full.json'
- 'software-sources.json'
- '**update-software.yml'
- 'update_software.py'
- 'SAMPLE-software-rules.json'
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
version: [23]
config: ['review_show_improvements_only=True,sitespeed_use_docker=False']
include:
- os: ubuntu-latest
config: 'review_show_improvements_only=True,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.x' # 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' }}
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' }}
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' }}
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' }}
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' }}
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' }}
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' }}
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' }}
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
- if: ${{ matrix.os == 'ubuntu-latest' }}
shell: bash
name: Setup GeckoDriver (Used for Selenium)
run: wget -q -O - https://github.com/mozilla/geckodriver/releases/download/v0.30.0/geckodriver-v0.30.0-linux64.tar.gz | tar -xvzf -
- name: Setup Sitespeed.io npm package (ONLY used for Sitespeed)
run: npm install sitespeed.io
- if: ${{ matrix.os == 'ubuntu-latest' }}
name: Setup config (using SAMPLE-config.py as config.py) - LINUX
run: python .github/workflows/verify_result.py -c ${{ matrix.config }}
- if: ${{ matrix.os == 'windows-latest' }}
name: Setup config (using SAMPLE-config.py as config.py) - WINDOWS
run: python .github\workflows\verify_result.py -c ${{ matrix.config }}
- if: ${{ matrix.os == 'ubuntu-latest' }}
name: RUNNING TEST - LINUX
run: |
python default.py -t ${{ matrix.version }} -r -u https://webperf.se/ -o .github/workflows/testresult-${{ matrix.version }}.json
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/ -o .github\workflows\testresult-${{ matrix.version }}.json
python .\.github\workflows\verify_result.py -t ${{ matrix.version }}