Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add flexible inputs to Actions Workflow for running e2e tests #2961

Merged
merged 1 commit into from
Jan 11, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
14 changes: 11 additions & 3 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,22 @@ name: Run e2e tests

on:
workflow_dispatch:

inputs:
run-target:
description: Command line for running e2e tests
default: 'yarn e2e:ci'
required: true
platforms:
description: OS platforms to test on (list of strings in JSON format)"
default: '["ubuntu-20.04"]'
required: true
jobs:
run-e2e-tests:
name: Run e2e tests
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-20.04]
os: ${{ fromJSON(inputs.platforms) }}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I learned this trick from actions/toolkit#184 (comment)

steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/setup-zui
Expand All @@ -21,7 +29,7 @@ jobs:
uses: GabrielBB/xvfb-action@v1
with:
options: -screen 0 1280x1024x24
run: yarn e2e:ci
run: ${{ inputs.run-target }}
- uses: actions/upload-artifact@v2
if: failure() && steps.playwright.outcome == 'failure'
with:
Expand Down