Skip to content

Commit

Permalink
Switch to pnpm
Browse files Browse the repository at this point in the history
Update dependencies
Unify workflow
  • Loading branch information
simonwep committed Jan 17, 2024
1 parent 4be79b8 commit 1200fd8
Show file tree
Hide file tree
Showing 5 changed files with 1,937 additions and 2,854 deletions.
59 changes: 51 additions & 8 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,33 +3,76 @@ name: Playwright Tests
on: ['push', 'pull_request']

jobs:
test:
build_test:
name: Build and test
timeout-minutes: 60
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- name: Checkout repository
uses: actions/checkout@v3

- name: Setup pnpm
uses: pnpm/action-setup@v2
with:
version: 8

- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '18.x'
node-version: 20
cache: 'pnpm'

- name: Install dependencies
run: npm ci
run: pnpm install --frozen-lockfile

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

- name: Lint
run: npm run lint
run: pnpm run lint

- name: Build
run: npm run build
run: pnpm run build

- name: Test
run: npm run test
run: pnpm run test

- name: Upload artifact
if: success()
uses: actions/upload-artifact@v3
with:
name: lib
path: dist

- uses: actions/upload-artifact@v2
if: always()
with:
name: playwright-report
path: playwright-report/
retention-days: 30

release:
if: startsWith(github.event.ref, 'refs/tags/v')
name: Publish new release
needs: build_test
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 20
registry-url: https://registry.npmjs.org/

- name: Download artifact
uses: actions/download-artifact@v2
with:
name: lib
path: dist

- name: Publish
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
36 changes: 0 additions & 36 deletions .github/workflows/release.yml

This file was deleted.

Loading

0 comments on commit 1200fd8

Please sign in to comment.