Skip to content

pylint #297

pylint #297 #1045

name: "Regression Test - Performance (Sitespeed.io) Test"
on:
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]
config: ['REVIEW_SHOW_IMPROVEMENTS_ONLY=True,SITESPEED_USE_DOCKER=False', 'REVIEW_SHOW_IMPROVEMENTS_ONLY=True,SITESPEED_USE_DOCKER=True']
version: [15]
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
- name: Setup Node.js (v4 version 20.x)
uses: actions/setup-node@v4
with:
node-version: '20.x'
- if: ${{ matrix.os == 'ubuntu-latest' }}
name: Setup SpeedIndex dependencies (ONLY used for Sitespeed) - Linux
run: |
sudo apt-get update -y
sudo apt-get install -y imagemagick libjpeg-dev xz-utils --no-install-recommends --force-yes
python -m pip install --upgrade pip
python -m pip install --upgrade setuptools
python -m pip install pyssim Pillow image
sudo apt install ffmpeg
- if: ${{ matrix.os == 'windows-latest' }}
name: Setup SpeedIndex dependencies (ONLY used for Sitespeed) - Windows
shell: pwsh
run: |
Write "${env:GITHUB_WORKSPACE}"
Write "${{ github.workspace }}"
python -m pip install --upgrade pip
python -m pip install --upgrade setuptools
python -m pip install pyssim Pillow image
Invoke-WebRequest -Uri https://github.com/GyanD/codexffmpeg/releases/download/2022-12-19-git-48d5aecfc4/ffmpeg-2022-12-19-git-48d5aecfc4-full_build.zip -OutFile .\data\ffmpeg-2022-12-19-git-48d5aecfc4-essentials_build.zip
Expand-Archive -LiteralPath .\data\ffmpeg-2022-12-19-git-48d5aecfc4-essentials_build.zip -DestinationPath .\data\
[System.Environment]::SetEnvironmentVariable("Path", [System.Environment]::GetEnvironmentVariable('Path',[System.EnvironmentVariableTarget]::Process) + ";${{ github.workspace }}\data\ffmpeg-2022-12-19-git-48d5aecfc4-full_build\bin;",[System.EnvironmentVariableTarget]::Process);
# TODO: unzip ffmpeg and handle ffmpeg.exe (Best way )
# Move-Item -Path .\data\ffmpeg-2022-12-19-git-48d5aecfc4-full_build\bin\ffmpeg.exe -Destination .\ffmpeg.exe
- if: ${{ matrix.os == 'ubuntu-latest' }}
name: Setup Google Chrome browser (ONLY used for Sitespeed) - Linux
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 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 -i sites.json -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 -i sites.json -o .github\workflows\testresult-${{ matrix.version }}.json
python .github\workflows\verify_result.py -t ${{ matrix.version }}