trying to fix workflow #87
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: Build Extensions | |
on: | |
push: | |
branches: | |
- 'develop' | |
- 'hotfix/**' | |
- 'feature/**' | |
pull_request: | |
branches: [develop] | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
browser: [chrome, edge] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: pnpm/action-setup@v2 | |
with: | |
version: 8 | |
- name: Setup Node.js | |
uses: actions/[email protected] | |
with: | |
node-version: 20 | |
cache: 'pnpm' | |
- name: Install dependencies | |
run: pnpm install | |
- name: Build And Package Extensions | |
run: pnpm build --zip --target=${{ matrix.browser }}-mv3 | |
# upload to github artifacts for each browser with matrix | |
- name: Upload to GitHub Artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ matrix.browser }}-mv3 | |
path: build/ | |
test: | |
runs-on: ubuntu-latest | |
needs: build | |
container: | |
image: mcr.microsoft.com/playwright:v1.41.0-jammy | |
strategy: | |
matrix: | |
browser: [chrome, edge] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Download artifacts | |
uses: actions/download-artifact@v4 | |
id: download | |
with: | |
name: ${{ matrix.browser }}-mv3 | |
path: build/ | |
- name: Unzip artifacts | |
run: unzip build/${{ matrix.browser }}-mv3-prod.zip -d build/extension | |
- uses: pnpm/action-setup@v2 | |
with: | |
version: 8 | |
- name: Setup Node.js | |
uses: actions/[email protected] | |
with: | |
node-version: 20 | |
cache: 'pnpm' | |
- name: Install dependencies | |
run: pnpm install --frozen-lockfile | |
- name: Install Playwright Browsers | |
run: pnpm exec playwright install --with-deps | |
- name: Test | |
run: pnpm test -- --project=${{ matrix.browser }} |