Skip to content

Commit

Permalink
Merge pull request #358 from Webperf-se/issue-357
Browse files Browse the repository at this point in the history
use sites.json as input for github actions
  • Loading branch information
7h3Rabbit authored Apr 3, 2024
2 parents 8b8633d + d6a7374 commit 88b6710
Show file tree
Hide file tree
Showing 17 changed files with 39 additions and 42 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/regression-test-404.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ jobs:
- 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 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 -u https://webperf.se/ -o .github\workflows\testresult-${{ matrix.version }}.json
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 }}
4 changes: 2 additions & 2 deletions .github/workflows/regression-test-a11y-statement.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ jobs:
- if: ${{ matrix.os == 'ubuntu-latest' }}
name: RUNNING TEST - LINUX
run: |
python default.py -t ${{ matrix.version }} -r -u https://polisen.se/ -o .github/workflows/testresult-${{ matrix.version }}.json
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 -u https://polisen.se/ -o .github\workflows\testresult-${{ matrix.version }}.json
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 }}
4 changes: 2 additions & 2 deletions .github/workflows/regression-test-css.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,10 @@ jobs:
- 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 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 -u https://webperf.se/ -o .github\workflows\testresult-${{ matrix.version }}.json
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 }}
4 changes: 2 additions & 2 deletions .github/workflows/regression-test-email.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,10 @@ jobs:
- 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 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 -u https://webperf.se/ -o .github\workflows\testresult-${{ matrix.version }}.json
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 }}
5 changes: 2 additions & 3 deletions .github/workflows/regression-test-google-lighthouse-based.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ jobs:
os: [ubuntu-latest, windows-latest]
config: ['REVIEW_SHOW_IMPROVEMENTS_ONLY=True,LIGHTHOUSE_USE_API=False']
version: [1, 4, 5, 8, 10, 22]
#version: [1, 4, 8, 10, 22]
steps:
- name: Check out repository code
uses: actions/checkout@v4
Expand All @@ -40,10 +39,10 @@ jobs:
- 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 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 -u https://webperf.se/ -o .github\workflows\testresult-${{ matrix.version }}.json
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 }}
4 changes: 2 additions & 2 deletions .github/workflows/regression-test-html.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,10 @@ jobs:
- 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 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 -u https://webperf.se/ -o .github\workflows\testresult-${{ matrix.version }}.json
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 }}
4 changes: 2 additions & 2 deletions .github/workflows/regression-test-http.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,10 @@ jobs:
- 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 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 -u https://webperf.se/ -o .github\workflows\testresult-${{ matrix.version }}.json
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 }}
4 changes: 2 additions & 2 deletions .github/workflows/regression-test-pa11y.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ jobs:
- if: ${{ matrix.os == 'ubuntu-20.04' }}
name: RUNNING TEST - LINUX
run: |
python default.py -t ${{ matrix.version }} -r -u https://webperf.se/ -o .github/workflows/testresult-${{ matrix.version }}.json
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 -u https://webperf.se/ -o .github\workflows\testresult-${{ matrix.version }}.json
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 }}
4 changes: 2 additions & 2 deletions .github/workflows/regression-test-sitespeed.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,10 @@ jobs:
- 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 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 -u https://webperf.se/ -o .github\workflows\testresult-${{ matrix.version }}.json
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 }}
4 changes: 2 additions & 2 deletions .github/workflows/regression-test-software.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,10 @@ jobs:
- 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 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 -u https://webperf.se/ -o .github\workflows\testresult-${{ matrix.version }}.json
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 }}
4 changes: 2 additions & 2 deletions .github/workflows/regression-test-standard-files.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ jobs:
- 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 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 -u https://webperf.se/ -o .github\workflows\testresult-${{ matrix.version }}.json
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 }}
4 changes: 2 additions & 2 deletions .github/workflows/regression-test-tracking.yml
Original file line number Diff line number Diff line change
Expand Up @@ -106,10 +106,10 @@ jobs:
- 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 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 -u https://webperf.se/ -o .github\workflows\testresult-${{ matrix.version }}.json
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 }}
2 changes: 1 addition & 1 deletion .github/workflows/regression-test-translations.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,5 @@ jobs:
git config --global user.name 'GitHub Action'
git config --global user.email '[email protected]'
git add locales/
git commit -m "Add changed Translation(s) if any"
git commit -m "Added changed Translation(s)"
git push
4 changes: 2 additions & 2 deletions .github/workflows/regression-test-webbkoll.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ jobs:
- 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 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 -u https://webperf.se/ -o .github\workflows\testresult-${{ matrix.version }}.json
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 }}
4 changes: 2 additions & 2 deletions .github/workflows/regression-test-ylt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,11 @@ jobs:
- 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 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 -u https://webperf.se/ -o .github\workflows\testresult-${{ matrix.version }}.json
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 }}
5 changes: 3 additions & 2 deletions docs/getting-started-github-actions.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ If you want to test/verify private websites you should probably look at one of t

## How to setup
- [Fork webperf-core repository](https://github.com/Webperf-se/webperf_core/fork?fragment=1)
- Remove tests you don't want from your `./github/workflows/` folder (You probably only want `codeql-analysis.yml` and `regression-test-translations.yml` if you are contributing).
- Remove tests you don't need from your `./github/workflows/` folder (You only need: `close-inactive-issues.yml`, `codeql-analysis.yml`, `pylint.yml`, `regression-test-translations.yml` and `update-software.yml` if you are contributing and are working on a Pull Request).
- Rest of the steps depend on how you want to run/trigger the test, see below

### Triggeron Push or Pull request
Expand All @@ -14,7 +14,8 @@ Choose this option if you want to [contribute](CONTRIBUTING.md) or have your own

#### How to setup:

- Change `https://webperf.se/` in all `.yml` files to the url you want to test with.
- Change `https://webperf.se/` in `sites.json` file to the url you want to test with.
(If you want to test more then one, add them)
- Now every time you push new changes or create a pull request all `.yml` tests will run.

### Trigger on a Schedule
Expand Down
17 changes: 7 additions & 10 deletions sites.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
{ "sites": [
{
"id": 0,
"url": "https://webperf.se/"
},
{
"id": 1,
"url": "https://surfalugnt.se/"
}
]
{
"sites": [
{
"id": 0,
"url": "https://webperf.se/"
}
]
}

0 comments on commit 88b6710

Please sign in to comment.