This repository has been archived by the owner on Oct 31, 2024. It is now read-only.
chore(deps): bump ws from 6.2.2 to 6.2.3 #232
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: E2E Playwright tests | |
env: | |
LABEL_RUNNING: e2e-running | |
LABEL_SUCCESS: e2e-passed | |
LABEL_FAIL: e2e-failed | |
on: | |
pull_request: | |
types: [labeled] | |
workflow_dispatch: | |
inputs: | |
page_url: | |
description: "Url of the instance you want to check" | |
required: false | |
default: "https://shopware-pwa-canary.storefrontcloud.io/" | |
jobs: | |
init: | |
name: Init dependencies | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Setup node | |
uses: actions/setup-node@v2 | |
with: | |
node-version: "16" | |
- name: Cache node_modules | |
uses: actions/cache@v2 | |
id: step-cache-node-modules | |
env: | |
cache-name: cache-node-modules-test | |
with: | |
path: | | |
node_modules | |
packages/*/node_modules | |
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('yarn.lock') }} | |
- name: Install dependencies | |
if: steps.step-cache-node-modules.outputs.cache-hit != 'true' | |
run: | | |
yarn --frozen-lockfile | |
test: | |
name: Playwright tests | |
needs: init | |
if: github.event.label.name == 'e2e-running' || github.event_name == 'push' | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Setup node | |
uses: actions/setup-node@v2 | |
with: | |
node-version: "16" | |
# Clear labels for e2e results | |
- name: remove e2e fail label | |
uses: buildsville/add-remove-label@v1 | |
with: | |
token: ${{secrets.GITHUB_TOKEN}} | |
label: ${{ env.LABEL_FAIL }} | |
type: remove | |
- name: remove e2e success label | |
uses: buildsville/add-remove-label@v1 | |
with: | |
token: ${{secrets.GITHUB_TOKEN}} | |
label: ${{ env.LABEL_SUCCESS }} | |
type: remove | |
- name: Cache node_modules | |
uses: actions/cache@v2 | |
id: step-cache-node-modules | |
env: | |
cache-name: cache-node-modules-test | |
with: | |
path: | | |
node_modules | |
packages/*/node_modules | |
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('yarn.lock') }} | |
- name: get preview url | |
id: get-preview-url | |
uses: patzick/action-get-comment-url@v1 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
platform: StorefrontCloud | |
- name: Set the env value | |
id: set-env-value | |
run: | | |
echo "BASE_URL=${{ github.event.inputs.page_url || steps.get-preview-url.outputs.comment_url }}" >> $GITHUB_ENV | |
- name: yarn test theme e2e | |
run: | | |
npx playwright install | |
yarn test:theme | |
env: | |
BASE_URL: ${{ github.event.inputs.page_url || steps.get-preview-url.outputs.comment_url }} | |
# Take care of labels | |
- name: remove running label | |
if: failure() || success() | |
uses: buildsville/add-remove-label@v1 | |
with: | |
token: ${{secrets.GITHUB_TOKEN}} | |
label: ${{ env.LABEL_RUNNING }} | |
type: remove | |
- name: add fail label if failed | |
if: failure() | |
uses: buildsville/add-remove-label@v1 | |
with: | |
token: ${{secrets.GITHUB_TOKEN}} | |
label: ${{ env.LABEL_FAIL }} | |
type: add | |
- name: add success label if tests passed | |
if: success() | |
uses: buildsville/add-remove-label@v1 | |
with: | |
token: ${{secrets.GITHUB_TOKEN}} | |
label: ${{ env.LABEL_SUCCESS }} | |
type: add |