Skip to content

Merge pull request #93 from awinogrodzki/fix/issue-92-incompatible-ba… #21

Merge pull request #93 from awinogrodzki/fix/issue-92-incompatible-ba…

Merge pull request #93 from awinogrodzki/fix/issue-92-incompatible-ba… #21

Workflow file for this run

name: Main
on:
pull_request:
paths:
- '**'
- '!*.md'
- '!**/*.md'
- '!.gitignore'
push:
branches: [ main ]
paths:
- '**'
- '!*.md'
- '!**/*.md'
- '!.gitignore'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
FIREBASE_API_KEY: AIzaSyAXYgJha6lO_L4qfWpnhf3KijeKYDhuFzQ
FIREBASE_PROJECT_ID: next-firebase-auth-edge-demo
FIREBASE_ADMIN_CLIENT_EMAIL: ${{ secrets.FIREBASE_ADMIN_CLIENT_EMAIL }}
FIREBASE_ADMIN_PRIVATE_KEY: ${{ secrets.FIREBASE_ADMIN_PRIVATE_KEY }}
jobs:
install:
name: Install dependencies
timeout-minutes: 10
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Use Node.js 18
uses: actions/setup-node@v3
with:
cache: 'yarn'
cache-dependency-path: yarn.lock
node-version: 18
- name: Cache node_modules
uses: actions/cache@v3
with:
path: |
node_modules
key: ${{ runner.os }}-node_modules-cache-v1-${{ hashFiles('./yarn.lock') }}-${{github.sha}}
restore-keys: |
${{ runner.os }}-node_modules-cache-v1-${{ hashFiles('./yarn.lock') }}-
- run: yarn install
build:
name: Build packages
timeout-minutes: 15
needs: install
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Use Node.js 18
uses: actions/setup-node@v3
with:
node-version: 18
- name: Cache node_modules
uses: actions/cache@v3
with:
path: |
node_modules
key: ${{ runner.os }}-node_modules-cache-v1-${{ hashFiles('./yarn.lock') }}-${{github.sha}}
- name: Cache build
uses: actions/cache@v3
with:
path: |
packages/**/lib
key: ${{ runner.os }}-build-cache-v1-${{ github.ref_name }}-${{github.sha}}
restore-keys: |
${{ runner.os }}-build-cache-v1-${{ github.ref_name }}-
- run: yarn build
lint:
name: Lint packages
timeout-minutes: 10
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Use Node.js 18
uses: actions/setup-node@v3
with:
node-version: 18
- name: Cache node_modules
uses: actions/cache@v3
with:
path: |
node_modules
key: ${{ runner.os }}-node_modules-cache-v1-${{ hashFiles('./yarn.lock') }}-${{github.sha}}
- run: yarn lint
tests:
name: Tests
timeout-minutes: 15
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v3
- name: Use Node.js 18
uses: actions/setup-node@v3
with:
node-version: 18
- name: Cache node_modules
uses: actions/cache@v3
with:
path: |
node_modules
key: ${{ runner.os }}-node_modules-cache-v1-${{ hashFiles('./yarn.lock') }}-${{github.sha}}
- name: Cache build
uses: actions/cache@v3
with:
path: |
packages/**/lib
key: ${{ runner.os }}-build-cache-v1-${{ github.ref_name }}-${{github.sha}}
- run: yarn test