add playwright #2
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
permissions: write-all | |
name: CI | |
on: | |
push: | |
branches: [main, development] | |
paths-ignore: | |
- '**/*.md' | |
- '**/*.env.example' | |
- '.gitignore' | |
pull_request: | |
branches: [main, development] | |
paths-ignore: | |
- '**/*.md' | |
- '**/*.env.example' | |
- '.gitignore' | |
env: | |
CI: true | |
jobs: | |
setup: | |
runs-on: ubuntu-latest | |
env: | |
PLAYWRIGHT_USERNAME: ${{ secrets.PLAYWRIGHT_USERNAME }} | |
PLAYWRIGHT_PASSWORD: ${{ secrets.PLAYWRIGHT_PASSWORD }} | |
steps: | |
- name: Checkout | |
uses: actions/[email protected] | |
- name: Install Node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '18.18.0' | |
- uses: pnpm/action-setup@v4 | |
name: Install pnpm | |
with: | |
version: 9 | |
run_install: false | |
- name: Get pnpm store directory | |
shell: bash | |
run: | | |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV | |
- uses: actions/cache@v4 | |
name: Setup pnpm cache | |
with: | |
path: ${{ env.STORE_PATH }} | |
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | |
restore-keys: | | |
${{ runner.os }}-pnpm-store- | |
- name: Install dependencies | |
run: pnpm install | |
lint: | |
needs: setup | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/[email protected] | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: '18.18.0' | |
- uses: pnpm/action-setup@v4 | |
name: Install pnpm | |
with: | |
version: 9 | |
run_install: false | |
- name: Setup pnpm cache | |
uses: actions/cache@v4 | |
with: | |
path: ${{ env.STORE_PATH }} | |
key: ${{ needs.setup.outputs.cache-key }} | |
- run: pnpm install | |
- run: pnpm run lint | |
build: | |
needs: lint | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/[email protected] | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: '18.18.0' | |
- uses: pnpm/action-setup@v4 | |
name: Install pnpm | |
with: | |
version: 9 | |
run_install: false | |
- name: Setup pnpm cache | |
uses: actions/cache@v4 | |
with: | |
path: ${{ env.STORE_PATH }} | |
key: ${{ needs.setup.outputs.cache-key }} | |
- run: pnpm install | |
- run: pnpm run build | |
- uses: actions/upload-artifact@v2 | |
with: | |
name: .next | |
path: .next |