refactor: use monorepo to publish packages #95
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: CI | |
on: | |
pull_request: | |
push: | |
jobs: | |
ci: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
pull-requests: write | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: pnpm/action-setup@v4 | |
with: | |
version: 9 | |
run_install: | | |
- args: [--frozen-lockfile, --strict-peer-dependencies] | |
- name: Get installed Playwright version | |
id: playwright-version | |
run: | | |
PLAYWRIGHT_VERSION=$(cat pnpm-lock.yaml | grep playwright-core | head -n 1 | cut -d '@' -f 2) | |
echo "PLAYWRIGHT_VERSION=${PLAYWRIGHT_VERSION}" >> $GITHUB_ENV | |
- name: Build | |
run: pnpm build | |
- name: Install Playwright Browsers | |
run: pnpm playwright install --with-deps | |
- name: Run test | |
uses: CodSpeedHQ/action@v3 | |
with: | |
run: CI=true pnpm test | |
token: ${{ secrets.CODSPEED_TOKEN }} | |
- name: "Report Coverage" | |
uses: davelosert/vitest-coverage-report-action@v2 | |
- name: Coveralls | |
uses: coverallsapp/github-action@v2 | |
with: | |
file: coverage/cobertura-coverage.xml | |
format: cobertura | |
fail-on-error: true | |
- uses: actions/upload-artifact@v4 | |
if: ${{ !cancelled() }} | |
with: | |
name: playwright-report | |
path: playwright-report/ | |
retention-days: 30 |