Configure Renovate #16
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: Web CI | |
on: | |
push: | |
branches: [ master, main ] | |
pull_request: | |
types: [opened, synchronize] | |
env: | |
NEXTAUTH_SECRET: ${{ secrets.NEXTAUTH_SECRET }} | |
DATABASE_URL: ${{ secrets.DATABASE_URL }} | |
GOOGLE_CLIENT_ID: ${{ secrets.GOOGLE_CLIENT_ID }} | |
GOOGLE_CLIENT_SECRET: ${{ secrets.GOOGLE_CLIENT_SECRET }} | |
PNPM_VERSION: 7.5.1 | |
NODE_VERSION: 16.* | |
jobs: | |
build: | |
name: Build and Test | |
timeout-minutes: 15 | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v3 | |
- name: Install Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ env.NODE_VERSION }} | |
- uses: pnpm/action-setup@v2 | |
name: Install pnpm | |
id: pnpm-install | |
with: | |
version: ${{ env.PNPM_VERSION }} | |
run_install: false | |
- 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 dependencies | |
run: pnpm install | |
- name: ESLint | |
run: pnpm lint | |
- name: Unit tests | |
run: pnpm test:vitest | |
- name: Build | |
run: pnpm build | |
- uses: actions/cache@v2 | |
with: | |
path: | | |
${{ github.workspace }}/.next | |
key: ${{ runner.os }}-build-${{ hashFiles('**/pnpm-lock.yaml') }}-${{ hashFiles('**.[jt]s', '**.[jt]sx') }} | |
restore-keys: | | |
${{ runner.os }}-build-${{ hashFiles('**/pnpm-lock.yaml') }}- | |
e2e-on-chrome: | |
needs: [ build ] | |
runs-on: ubuntu-latest | |
name: E2E on Chrome | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v3 | |
- name: Install Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ env.NODE_VERSION }} | |
- uses: pnpm/action-setup@v2 | |
name: Install pnpm | |
id: pnpm-install | |
with: | |
version: ${{ env.PNPM_VERSION }} | |
run_install: false | |
- name: Cache | |
uses: actions/cache@v2 | |
id: restore-build | |
with: | |
path: | | |
${{ github.workspace }}/.next | |
key: | | |
${{ runner.os }}-build-${{ hashFiles('**/pnpm-lock.yaml') }}- | |
- uses: cypress-io/github-action@v4 | |
env: | |
NEXTAUTH_SECRET: ${{ env.NEXTAUTH_SECRET }} | |
DATABASE_URL: ${{ env.DATABASE_URL }} | |
GOOGLE_CLIENT_ID: ${{ env.GOOGLE_CLIENT_ID }} | |
GOOGLE_CLIENT_SECRET: ${{ env.GOOGLE_CLIENT_SECRET }} | |
with: | |
start: pnpm start | |
wait-on: "http://localhost:3000" | |
wait-on-timeout: 120 | |
browser: chrome | |
command: pnpm e2e:chrome | |
e2e-on-edge: | |
needs: [ build ] | |
runs-on: ubuntu-latest | |
name: E2E on Edge | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v3 | |
- name: Install Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ env.NODE_VERSION }} | |
- uses: pnpm/action-setup@v2 | |
name: Install pnpm | |
id: pnpm-install | |
with: | |
version: ${{ env.PNPM_VERSION }} | |
run_install: false | |
- name: Cache | |
uses: actions/cache@v2 | |
id: restore-build | |
with: | |
path: | | |
${{ github.workspace }}/.next | |
key: | | |
${{ runner.os }}-build-${{ hashFiles('**/pnpm-lock.yaml') }}- | |
- uses: cypress-io/github-action@v4 | |
env: | |
NEXTAUTH_SECRET: ${{ env.NEXTAUTH_SECRET }} | |
DATABASE_URL: ${{ env.DATABASE_URL }} | |
GOOGLE_CLIENT_ID: ${{ env.GOOGLE_CLIENT_ID }} | |
GOOGLE_CLIENT_SECRET: ${{ env.GOOGLE_CLIENT_SECRET }} | |
with: | |
start: pnpm start | |
wait-on: "http://localhost:3000" | |
wait-on-timeout: 120 | |
browser: edge | |
command: pnpm e2e:edge |