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-11-01 18:29:14 +00:00
|
|
|
- name: Setup pnpm
|
|
|
|
uses: pnpm/action-setup@v4
|
|
|
|
with:
|
|
|
|
version: 9.12.3
|
|
|
|
|
2024-07-24 12:39:54 +00:00
|
|
|
- name: Setup Node.js
|
2024-11-01 18:29:14 +00:00
|
|
|
uses: actions/setup-node@v4
|
2023-03-13 18:22:51 +00:00
|
|
|
with:
|
2024-11-01 18:29:14 +00:00
|
|
|
node-version: 20.18.0
|
|
|
|
cache: 'pnpm'
|
2022-06-29 14:46:51 +00:00
|
|
|
|
2023-03-13 18:22:51 +00:00
|
|
|
- name: Install dependencies
|
2024-11-01 18:29:14 +00:00
|
|
|
run: pnpm install --frozen-lockfile
|
2022-06-29 14:46:51 +00:00
|
|
|
|
2023-03-13 18:22:51 +00:00
|
|
|
- name: Build
|
2024-11-01 18:29:14 +00:00
|
|
|
run: pnpm build
|
2022-06-29 14:46:51 +00:00
|
|
|
|
2023-03-13 18:22:51 +00:00
|
|
|
- name: Typecheck
|
2024-11-01 18:29:14 +00:00
|
|
|
run: pnpm typecheck
|
2022-06-29 14:46:51 +00:00
|
|
|
|
2023-03-13 18:22:51 +00:00
|
|
|
- name: Lint
|
2024-11-01 18:29:14 +00:00
|
|
|
run: pnpm lint && pnpm format --check
|
2022-06-29 14:46:51 +00:00
|
|
|
|
2023-03-13 18:22:51 +00:00
|
|
|
- name: Test
|
2024-11-01 18:29:14 +00:00
|
|
|
run: pnpm test
|