Generate a dynamic matrix of test names for Selenium tests
Signed-off-by: William Desportes <williamdes@wdes.fr>
This commit is contained in:
parent
5139170303
commit
59c349958b
39
.github/workflows/test-selenium.yml
vendored
39
.github/workflows/test-selenium.yml
vendored
@ -16,9 +16,25 @@ env:
|
||||
node-version: "12"
|
||||
|
||||
jobs:
|
||||
generate-matrix:
|
||||
name: Generate the matrix of Selenium tests
|
||||
if: "!contains(github.event.head_commit.message, '[ci selenium skip]')"
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
tests: ${{ steps.tests-list.outputs.tests }}
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v6
|
||||
- id: tests-list
|
||||
name: Send test names to outputs
|
||||
run: |
|
||||
set -euo pipefail
|
||||
TEST_NAMES="[$(find $PWD/test/selenium/ -type f -name '*Test.php' -print |sed -E "s,$PWD/test/selenium/(.*)Test.php,{\"test-name\": \"\1\"}," | paste -sd ",")]"
|
||||
echo "tests=$(printf "$TEST_NAMES")" >> $GITHUB_OUTPUT
|
||||
selenium:
|
||||
name: "Selenium"
|
||||
if: "!contains(github.event.head_commit.message, '[ci selenium skip]')"
|
||||
needs: generate-matrix
|
||||
runs-on: "ubuntu-latest"
|
||||
services:
|
||||
database-server:
|
||||
@ -59,28 +75,7 @@ jobs:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
test-name:
|
||||
- "ChangePassword"
|
||||
- "CreateDropDatabase"
|
||||
- "CreateRemoveUser"
|
||||
- "Database/Events"
|
||||
- "Database/Operations"
|
||||
- "Database/Procedures"
|
||||
- "Database/Structure"
|
||||
- "Export"
|
||||
- "Import"
|
||||
- "Login"
|
||||
- "Normalization"
|
||||
- "ServerSettings"
|
||||
- "SqlQuery"
|
||||
- "Table/Browse"
|
||||
- "Table/Create"
|
||||
- "Table/Insert"
|
||||
- "Table/Operations"
|
||||
- "Table/Structure"
|
||||
- "Tracking"
|
||||
- "Triggers"
|
||||
- "Xss"
|
||||
include: ${{ fromJSON(needs.generate-matrix.outputs.tests) }}
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v6
|
||||
|
||||
Loading…
Reference in New Issue
Block a user