2424 default : ' production'
2525 type : choice
2626 options :
27- - localhost
27+ - local
2828 - preview
2929 - production
3030 browser_matrix :
4545 id : set-matrix
4646 run : |
4747 if [ "${{ github.event.inputs.test_type }}" == "e2e" ] || [ "${{ github.event.inputs.test_type }}" == "all" ]; then
48- echo "matrix={\"include\":[
49- {\"test-type\":\"unit\",\"node-version\":\"18\",\"docs-env\":\"localhost\"},
50- {\"test-type\":\"unit\",\"node-version\":\"20\",\"docs-env\":\"production\"},
51- {\"test-type\":\"e2e\",\"browser\":\"chromium\",\"docs-env\":\"localhost\"},
52- {\"test-type\":\"e2e\",\"browser\":\"firefox\",\"docs-env\":\"preview\"},
53- {\"test-type\":\"e2e\",\"browser\":\"webkit\",\"docs-env\":\"production\"},
54- {\"test-type\":\"visual\",\"browser\":\"chromium\",\"docs-env\":\"production\"},
55- {\"test-type\":\"performance\",\"browser\":\"chromium\",\"docs-env\":\"production\"}
56- ]}" >> $GITHUB_OUTPUT
48+ echo 'matrix={"include":[{"test-type":"unit","node-version":"18","docs-env":"local"},{"test-type":"unit","node-version":"20","docs-env":"production"},{"test-type":"e2e","browser":"chromium","docs-env":"local"},{"test-type":"e2e","browser":"firefox","docs-env":"preview"},{"test-type":"e2e","browser":"webkit","docs-env":"production"},{"test-type":"visual","browser":"chromium","docs-env":"production"},{"test-type":"performance","browser":"chromium","docs-env":"production"}]}' >> $GITHUB_OUTPUT
5749 else
58- echo "matrix={\"include\":[
59- {\"test-type\":\"unit\",\"node-version\":\"20\",\"docs-env\":\"production\"}
60- ]}" >> $GITHUB_OUTPUT
50+ echo 'matrix={"include":[{"test-type":"unit","node-version":"20","docs-env":"production"}]}' >> $GITHUB_OUTPUT
6151 fi
6252
6353 enhanced-test-matrix :
@@ -112,7 +102,7 @@ jobs:
112102 export SHARD_TOTAL=2
113103 npx playwright test --project=${{ matrix.browser }} --reporter=json --reporter=junit
114104 env :
115- BASE_URL : ${{ matrix.docs-env == 'localhost ' && 'http://localhost:3000' || matrix.docs-env == 'preview' && 'https://ifla-standards-preview.netlify.app' || 'https://standards.ifla.org' }}
105+ BASE_URL : ${{ matrix.docs-env == 'local ' && 'http://localhost:3000' || matrix.docs-env == 'preview' && 'https://ifla-standards-preview.netlify.app' || 'https://standards.ifla.org' }}
116106
117107 # Visual regression testing
118108 - name : Run visual regression tests
@@ -121,7 +111,7 @@ jobs:
121111 export DOCS_ENV=${{ matrix.docs-env }}
122112 npx playwright test e2e/visual-regression-enhanced.spec.ts --project=${{ matrix.browser }} --reporter=json
123113 env :
124- BASE_URL : ${{ matrix.docs-env == 'localhost ' && 'http://localhost:3000' || matrix.docs-env == 'preview' && 'https://ifla-standards-preview.netlify.app' || 'https://standards.ifla.org' }}
114+ BASE_URL : ${{ matrix.docs-env == 'local ' && 'http://localhost:3000' || matrix.docs-env == 'preview' && 'https://ifla-standards-preview.netlify.app' || 'https://standards.ifla.org' }}
125115
126116 # Performance testing
127117 - name : Run performance tests
@@ -130,7 +120,7 @@ jobs:
130120 export DOCS_ENV=${{ matrix.docs-env }}
131121 npx playwright test e2e/performance.spec.ts --project=${{ matrix.browser }} --reporter=json
132122 env :
133- BASE_URL : ${{ matrix.docs-env == 'localhost ' && 'http://localhost:3000' || matrix.docs-env == 'preview' && 'https://ifla-standards-preview.netlify.app' || 'https://standards.ifla.org' }}
123+ BASE_URL : ${{ matrix.docs-env == 'local ' && 'http://localhost:3000' || matrix.docs-env == 'preview' && 'https://ifla-standards-preview.netlify.app' || 'https://standards.ifla.org' }}
134124
135125 # Upload test results
136126 - name : Upload test results
0 commit comments