Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions .github/workflows/fe-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,48 @@ on:
required: true

jobs:
e2e-playwright:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
ref: ${{ inputs.GHA_REF }}
fetch-depth: 0

- uses: actions/setup-node@v3
with:
node-version: 22.15.0

- name: Cache Node Modules
id: npm-cache
uses: actions/cache@v4
with:
path: '**/node_modules'
key: ${{ runner.os }}-modules-${{ hashFiles('**/package-lock.json') }}

- name: Install Playwright Browsers
run: npx playwright install --with-deps

- name: Fetch base branch
run: git fetch origin ${{ inputs.GHA_BASE }}:${{ inputs.GHA_BASE }} || true

- name: Affected Regression Tests
id: playwrightRegressionTests
continue-on-error: true
uses: collaborationFactory/github-actions/.github/actions/run-many@test/playwright
with:
target: 'e2e-playwright'
jobIndex: 1
jobCount: 1
base: ${{ inputs.GHA_BASE }}
ref: ${{ inputs.GHA_REF }}

- name: Fail pipeline if regressionTests step failed
run: |
if [ "${{ steps.playwrightRegressionTests.outcome }}" = "failure" ]; then
echo "Regression tests step failed, failing the pipeline."
exit 1
fi
e2e:
runs-on: ubuntu-latest
container:
Expand Down
4 changes: 3 additions & 1 deletion tools/scripts/run-many/run-many.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,12 @@ function main() {
const projects = getAffectedProjects(target, jobIndex, jobCount, base, ref);

const runManyProjectsCmd = `npx nx run-many --targets=${target} --projects="${projects}"`;
let cmd = `${runManyProjectsCmd} --parallel=false --prod`;
let cmd = `${runManyProjectsCmd} --parallel=false`;

if (target.includes('e2e')) {
cmd = getE2ECommand(cmd, base);
} else {
cmd = cmd.concat(' --prod');
}

// Add coverage flag if enabled and target is test
Expand Down