v1.18.0 #181
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: 🧪 Lint and test | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref_name }} | |
cancel-in-progress: true | |
jobs: | |
build_and_test: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
max-parallel: 1 | |
matrix: | |
node: [18, 20] | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: pnpm/action-setup@v2 | |
name: Install pnpm | |
with: | |
version: 8 | |
- run: pnpm recursive install | |
- uses: supercharge/[email protected] | |
with: | |
redis-version: 6 | |
- name: Linting | |
continue-on-error: true | |
run: pnpm lint | |
- run: ./pkg/pocketbase/test/pocketbase serve & | |
- name: Run the tests | |
run: pnpm coverage | |
- name: Setup playwright | |
run: | | |
npx playwright install | |
npx playwright install-deps | |
pnpm build | |
pnpm exec playwright test | |
working-directory: ./pkg/browser | |
# - name: Upload coverage reports to Codecov | |
# uses: codecov/codecov-action@v3 | |
# env: | |
# CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
publish: | |
runs-on: ubuntu-latest | |
needs: build_and_test | |
if: github.ref == 'refs/heads/main' | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: "0" | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 16.x | |
registry-url: 'https://registry.npmjs.org' | |
- uses: pnpm/action-setup@v2 | |
name: Install pnpm | |
with: | |
version: 8 | |
- name: Build all | |
run: pnpm i | |
- name: Build all | |
run: pnpm build | |
- name: Build @slangroom/browser | |
run: pnpm build | |
working-directory: ./pkg/browser | |
- name: Release | |
run: | | |
git config --global user.email "[email protected]" && git config --global user.name "Dev Dyne.org" | |
echo "//registry.npmjs.org/:_authToken=$NODE_AUTH_TOKEN" > .npmrc | |
pnpm whoami | |
pnpm publish:ci | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |