From 11cc1910c2e7826451a907d3c6bcdc1725649268 Mon Sep 17 00:00:00 2001 From: David Souther Date: Fri, 12 Jul 2024 08:06:18 -0400 Subject: [PATCH] Massage all .github action workflows. --- .github/workflows/deploy.yaml | 25 ++++++++++++++++++++----- .github/workflows/extension.yaml | 4 +++- .github/workflows/playwright.yml | 17 +++++++---------- .github/workflows/test.yaml | 10 ++++------ 4 files changed, 34 insertions(+), 22 deletions(-) diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index e6ecd149a..861c92b3a 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -5,6 +5,8 @@ on: push: branches: [main] paths: + - components + - projects - simulator - web @@ -13,11 +15,10 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - name: Use Node.js 20 - uses: actions/setup-node@v3 + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 with: - node-version: 20 + node-version: lts/* - name: Cache node modules id: cache-npm @@ -30,7 +31,21 @@ jobs: key: ${{ hashFiles('**/package-lock.json') }} - name: Install - run: npm install + run: npm clean-install + + - name: CI + run: | + npm run CI + npx playwright install --with-deps + npx playwright test + env: + CI: true + - uses: actions/upload-artifact@v4 + if: always() + with: + name: playwright-report + path: playwright-report/ + retention-days: 30 - name: CD run: | diff --git a/.github/workflows/extension.yaml b/.github/workflows/extension.yaml index 4f8e022b2..30fc42fc3 100644 --- a/.github/workflows/extension.yaml +++ b/.github/workflows/extension.yaml @@ -5,6 +5,8 @@ on: push: branches: [main] paths: + - components + - projects - simulator - extension @@ -30,7 +32,7 @@ jobs: key: ${{ hashFiles('**/package-lock.json') }} - name: Install - run: npm install + run: npm clean-install - name: CD run: | diff --git a/.github/workflows/playwright.yml b/.github/workflows/playwright.yml index ab33c8ce8..de36c7441 100644 --- a/.github/workflows/playwright.yml +++ b/.github/workflows/playwright.yml @@ -1,5 +1,6 @@ name: Playwright Tests on: + workflow_dispatch: push: branches: [main] pull_request: @@ -13,9 +14,6 @@ jobs: - uses: actions/setup-node@v4 with: node-version: lts/* - - name: Install dependencies - run: npm ci - - name: Cache node modules id: cache-npm uses: actions/cache@v3 @@ -31,18 +29,17 @@ jobs: continue-on-error: true run: npm list - - name: Install - run: npm install + - name: Install dependencies + run: npm clean-install - name: CI - run: npm run ci + run: | + npm run ci + npx playwright install --with-deps + npx playwright test env: CI: true - - name: Install Playwright Browsers - run: npx playwright install --with-deps - - name: Run Playwright tests - run: npx playwright test - uses: actions/upload-artifact@v4 if: always() with: diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 1a741782a..a13c03cff 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -2,19 +2,17 @@ name: Run Workspace Tests on: pull_request: - branches: ["main", "pwa-main"] + branches: ["main"] jobs: all: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - - name: Use Node.js 20 - uses: actions/setup-node@v3 + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 with: - node-version: 20 + node-version: lts/* - name: Cache node modules id: cache-npm