cal.pub0.org/.github/workflows/build.yml

72 lines
1.5 KiB
YAML
Raw Normal View History

2021-08-17 09:35:07 +00:00
name: Build
on: [push]
jobs:
2021-09-02 16:41:15 +00:00
build:
2021-08-17 09:35:07 +00:00
name: Build on Node ${{ matrix.node }} and ${{ matrix.os }}
2021-09-27 16:09:19 +00:00
env:
DATABASE_URL: postgresql://postgres:@localhost:5432/calendso
NODE_ENV: test
BASE_URL: http://localhost:3000
JWT_SECRET: secret
services:
postgres:
image: postgres:12.1
env:
POSTGRES_USER: postgres
POSTGRES_DB: calendso
ports:
- 5432:5432
2021-08-17 09:35:07 +00:00
runs-on: ${{ matrix.os }}
strategy:
matrix:
node: ["14.x"]
os: [ubuntu-latest]
steps:
- name: Checkout repo
uses: actions/checkout@v2
- name: Use Node ${{ matrix.node }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node }}
- name: Install deps
uses: bahmutov/npm-install@v1
2021-09-02 16:41:15 +00:00
- name: Next.js cache
uses: actions/cache@v2
with:
path: ${{ github.workspace }}/.next/cache
key: ${{ runner.os }}-nextjs
2021-09-27 16:09:19 +00:00
- run: yarn prisma migrate deploy
- run: yarn test
2021-08-17 09:35:07 +00:00
- run: yarn build
types:
name: Check types
strategy:
matrix:
node: ["14.x"]
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout repo
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Use Node ${{ matrix.node }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node }}
- name: Install deps
uses: bahmutov/npm-install@v1
- run: yarn check-changed-files