Reduce 0418 from OS削除 はじまりの大地 #45
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: ci | |
on: | |
push: | |
jobs: | |
actionlint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Run actionlint | |
shell: bash | |
run: | | |
bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash) | |
./actionlint -color | |
nix-flake: | |
name: Nix Flake Check | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout | |
uses: actions/checkout@v4 | |
- name: prepare nix | |
uses: cachix/install-nix-action@v29 | |
- name: flake check | |
run: nix flake check | |
lint-yasunori-toml: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
- run: | | |
#!/usr/bin/env bash | |
set -euo pipefail | |
mkdir -p "${HOME}"/bin | |
echo "PATH=${HOME}/bin:${PATH}" >> "${GITHUB_ENV}" | |
curl \ | |
--show-error \ | |
--silent \ | |
--location \ | |
--fail \ | |
--retry 3 \ | |
--connect-timeout 5 \ | |
--max-time 60 \ | |
--output "${HOME}/bin/yj" \ | |
"https://github.com/sclevine/yj/releases/download/v5.1.0/yj-linux-amd64" | |
chmod +x "${HOME}"/bin/yj | |
npm install -g ajv-cli | |
- run: yj -tj < yasunori.toml > yasunori.json | |
- run: npx ajv validate -s schema.json -d yasunori.json | |
api-test: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: packages/api | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: pnpm/action-setup@v4 | |
with: | |
version: 9 # package.jsonにpackageManagerをつけてもサブディレクトリのせいか、これがないとエラーになる | |
- name: Install dependencies | |
run: pnpm install --frozen-lockfile | |
- name: Setup | |
run: pnpm run generate:json | |
- name: Test | |
run: pnpm test | |
api-lint: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: packages/api | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: pnpm/action-setup@v4 | |
with: | |
version: 9 # package.jsonにpackageManagerをつけてもサブディレクトリのせいか、これがないとエラーになる | |
- name: Install dependencies | |
run: pnpm install --frozen-lockfile | |
- name: Setup | |
run: pnpm run generate:json | |
- name: Typecheck | |
run: pnpm run typecheck | |
- name: Lint | |
run: pnpm run lint | |
- name: Format | |
run: pnpm biome format | |
web-lint: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: packages/web | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: pnpm/action-setup@v4 | |
with: | |
version: 9 # package.jsonにpackageManagerをつけてもサブディレクトリのせいか、これがないとエラーになる | |
- name: Install dependencies | |
run: pnpm install --frozen-lockfile | |
- name: Typecheck | |
run: pnpm run typecheck | |
- name: Lint | |
run: pnpm run lint | |
- name: Format | |
run: pnpm biome format |