2022-02-23 14:03:14 +00:00
|
|
|
name: CI
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
2023-03-13 18:22:51 +00:00
|
|
|
branches: ['main']
|
2022-06-29 14:46:51 +00:00
|
|
|
pull_request:
|
|
|
|
types: [opened, synchronize]
|
2024-07-24 12:51:36 +00:00
|
|
|
workflow_call:
|
2022-02-23 14:03:14 +00:00
|
|
|
|
2023-06-21 10:35:48 +00:00
|
|
|
env:
|
2023-06-28 16:41:35 +00:00
|
|
|
NEXT_PUBLIC_GHOST_API_URL: ''
|
2023-06-21 10:35:48 +00:00
|
|
|
NEXT_PUBLIC_GHOST_API_KEY: ''
|
|
|
|
INFURA_API_KEY: ''
|
|
|
|
|
2022-02-23 14:03:14 +00:00
|
|
|
jobs:
|
2022-06-29 14:46:51 +00:00
|
|
|
build:
|
2023-03-13 18:22:51 +00:00
|
|
|
name: Build and Test
|
|
|
|
timeout-minutes: 15
|
2024-07-24 12:39:54 +00:00
|
|
|
runs-on: ubuntu-latest
|
2022-06-29 14:46:51 +00:00
|
|
|
|
2023-03-13 18:22:51 +00:00
|
|
|
steps:
|
|
|
|
- name: Check out code
|
|
|
|
uses: actions/checkout@v3
|
|
|
|
with:
|
|
|
|
fetch-depth: 2
|
2022-06-29 14:46:51 +00:00
|
|
|
|
2024-07-24 12:39:54 +00:00
|
|
|
- name: Setup Node.js
|
2023-03-13 18:22:51 +00:00
|
|
|
uses: actions/setup-node@v3
|
|
|
|
with:
|
2023-04-26 10:06:18 +00:00
|
|
|
node-version: 18
|
2023-03-13 18:22:51 +00:00
|
|
|
cache: 'yarn'
|
2022-06-29 14:46:51 +00:00
|
|
|
|
2023-03-13 18:22:51 +00:00
|
|
|
- name: Install dependencies
|
|
|
|
run: yarn --frozen-lockfile
|
2022-06-29 14:46:51 +00:00
|
|
|
|
2023-03-13 18:22:51 +00:00
|
|
|
- name: Build
|
|
|
|
run: yarn build
|
2022-06-29 14:46:51 +00:00
|
|
|
|
2023-03-13 18:22:51 +00:00
|
|
|
- name: Typecheck
|
|
|
|
run: yarn typecheck
|
2022-06-29 14:46:51 +00:00
|
|
|
|
2023-03-13 18:22:51 +00:00
|
|
|
- name: Lint
|
2023-03-13 20:48:08 +00:00
|
|
|
run: yarn lint && yarn format --check
|
2022-06-29 14:46:51 +00:00
|
|
|
|
2023-03-13 18:22:51 +00:00
|
|
|
- name: Test
|
|
|
|
run: yarn test
|