public_notes/.github/workflows/ci.yaml

40 lines
786 B
YAML
Raw Normal View History

2023-07-23 09:27:41 +09:00
name: Build and Test
2021-07-19 00:54:00 +09:00
on:
push:
branches:
2023-06-08 02:52:53 +09:00
- v4-alpha # TODO: update
2021-07-19 00:54:00 +09:00
jobs:
2023-07-20 14:00:44 +09:00
build-and-test:
2023-05-29 09:44:08 +09:00
runs-on: ubuntu-22.04
permissions:
contents: write
2021-07-19 00:54:00 +09:00
steps:
2023-05-29 09:44:08 +09:00
- uses: actions/checkout@v3
2022-05-03 14:51:15 +09:00
with:
2023-05-29 09:44:08 +09:00
fetch-depth: 0
2021-07-19 00:54:00 +09:00
2023-05-29 09:44:08 +09:00
- name: Setup Node
uses: actions/setup-node@v3
2021-07-19 00:54:00 +09:00
with:
2023-06-08 02:52:53 +09:00
node-version: 18
2021-07-19 00:54:00 +09:00
2023-05-29 09:44:08 +09:00
- name: Cache dependencies
uses: actions/cache@v3
2021-07-19 00:54:00 +09:00
with:
2023-05-29 09:44:08 +09:00
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
2021-07-19 00:54:00 +09:00
2023-05-29 09:44:08 +09:00
- run: npm ci
2023-07-23 09:39:10 +09:00
- name: Check types and style
run: npm check
2023-05-29 09:44:08 +09:00
2023-07-13 16:19:35 +09:00
- name: Test
run: npm test
2021-07-19 00:54:00 +09:00
2023-07-13 16:19:35 +09:00
- name: Ensure Quartz builds
2023-07-23 09:27:41 +09:00
run: npx quartz build