chore: posthog-js-lite migration #5699
This file contains hidden or 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: Library checks | |
on: | |
pull_request: | |
push: | |
branches: | |
- main | |
jobs: | |
unit: | |
name: Unit tests | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup environment | |
uses: ./.github/actions/setup | |
with: | |
build: true | |
- run: pnpm test:unit | |
- run: pnpm write-mangled-property-names | |
working-directory: packages/browser | |
- run: git diff --exit-code # fail if e.g. the mangled properties list has changed, see rollup.config.js | |
integration: | |
name: Playwright E2E tests | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup environment | |
uses: ./.github/actions/setup | |
with: | |
build: true | |
- name: Install Playwright Browsers | |
run: pnpm exec playwright install --with-deps | |
working-directory: packages/browser | |
- name: Run Playwright tests | |
run: pnpm exec playwright test | |
working-directory: packages/browser | |
- uses: actions/upload-artifact@v4 | |
if: ${{ !cancelled() }} | |
with: | |
name: playwright-report | |
path: packages/browser/playwright-report/ | |
retention-days: 30 | |
functional: | |
name: Functional tests | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup environment | |
uses: ./.github/actions/setup | |
with: | |
build: true | |
- run: pnpm test:functional | |
lint: | |
name: Lint | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup environment | |
uses: ./.github/actions/setup | |
- name: Lint all packages | |
run: pnpm lint |