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: build breadchain.xyz | |
on: | |
pull_request: | |
branches: [development] | |
push: | |
branches: [development] | |
jobs: | |
linting: | |
name: ESLint | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Setup node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
cache: "pnpm" | |
run: pnpm site install | |
# - name: Install Dependencies | |
# run: pnpm site install | |
- name: Lint | |
run: pnpm site run lint | |
build: | |
name: Next Build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v3 | |
- name: Setup node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
cache: "pnpm" | |
run: pnpm site install | |
# - name: Setup pnpm | |
# uses: pnpm/action-setup@v2 | |
# with: | |
# version: 8.8.0 | |
# - name: Install Dependencies | |
# run: pnpm site install | |
- name: Run build | |
run: pnpm site run build | |
test: | |
name: Playwright Testss | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v3 | |
- name: Setup node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
cache: "pnpm" | |
run: pnpm site install | |
# - name: Setup pnpm | |
# uses: pnpm/action-setup@v2 | |
# with: | |
# version: 8.8.0 | |
# - name: Install Dependencies | |
# run: pnpm sites install | |
- name: Run build | |
run: pnpm site run build | |
# - name: Get pnpm store directory | |
# id: pnpm-cache | |
# shell: bash | |
# run: | | |
# echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT | |
# - uses: actions/cache@v3 | |
# name: Setup pnpm cache | |
# with: | |
# path: ${{ steps.pnpm-cache.outputs.STORE_PATH }} | |
# key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | |
# restore-keys: | | |
# ${{ runner.os }}-pnpm-store- | |
- name: Install Playwright Browsers | |
run: pnpm site playwright install --with-deps | |
- name: Run Playwright tests | |
run: pnpm site playwright test | |
- uses: actions/upload-artifact@v3 | |
if: always() | |
with: | |
name: playwright-report | |
path: playwright-report/ | |
retention-days: 30 |