ビルドが通るまでエラー箇所を潰す #281
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: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
types: | |
- opened | |
- reopened | |
- synchronize | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
defaults: | |
run: | |
shell: bash | |
jobs: | |
paths-filter: | |
name: Changed Paths Filter | |
runs-on: ubuntu-24.04 | |
permissions: | |
contents: read | |
pull-requests: read | |
timeout-minutes: 5 | |
outputs: | |
astro: ${{ steps.filter.outputs.astro }} | |
root: ${{ steps.filter.outputs.root }} | |
steps: | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2 | |
id: filter | |
with: | |
filters: | | |
astro: | |
- 'packages/sushichan.live/**' | |
root: | |
- '*' | |
eslint: | |
name: ESLint | |
needs: paths-filter | |
if: ${{ needs.paths-filter.outputs.astro == 'true' }} | |
runs-on: ubuntu-24.04 | |
timeout-minutes: 10 | |
permissions: | |
contents: read | |
steps: | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
- name: Setup Node.js and pnpm | |
uses: ./.github/common/setup-node-pnpm | |
- name: Run ESLint on Astro | |
if: ${{ needs.paths-filter.outputs.astro == 'true' }} | |
run: pnpm run --filter=sushichan.live lint:check | |
env: | |
PUBLIC_CLOUDINARY_API_KEY: ${{ secrets.PUBLIC_CLOUDINARY_API_KEY }} | |
CLOUDINARY_API_SECRET: ${{ secrets.CLOUDINARY_API_SECRET }} | |
PUBLIC_CLOUDINARY_CLOUD_NAME: ${{ secrets.PUBLIC_CLOUDINARY_CLOUD_NAME }} | |
tsc: | |
name: tsc | |
needs: paths-filter | |
if: ${{ needs.paths-filter.outputs.astro == 'true' }} | |
runs-on: ubuntu-24.04 | |
timeout-minutes: 10 | |
permissions: | |
contents: read | |
steps: | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
- name: Setup Node.js and pnpm | |
uses: ./.github/common/setup-node-pnpm | |
- name: Run tsc on Astro | |
if: ${{ needs.paths-filter.outputs.astro == 'true' }} | |
run: pnpm run --filter=sushichan.live typecheck | |
env: | |
PUBLIC_CLOUDINARY_API_KEY: ${{ secrets.PUBLIC_CLOUDINARY_API_KEY }} | |
CLOUDINARY_API_SECRET: ${{ secrets.CLOUDINARY_API_SECRET }} | |
PUBLIC_CLOUDINARY_CLOUD_NAME: ${{ secrets.PUBLIC_CLOUDINARY_CLOUD_NAME }} | |
prettier: | |
name: Prettier | |
needs: paths-filter | |
if: ${{ needs.paths-filter.outputs.astro == 'true' || needs.paths-filter.outputs.root == 'true' }} | |
runs-on: ubuntu-24.04 | |
timeout-minutes: 5 | |
permissions: | |
contents: read | |
steps: | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
- name: Setup Node.js and pnpm | |
uses: ./.github/common/setup-node-pnpm | |
- name: Run Prettier on Astro | |
if: ${{ needs.paths-filter.outputs.astro == 'true' }} | |
run: pnpm run --filter=sushichan.live format:check | |
- name: Run Prettier on Root | |
if: ${{ needs.paths-filter.outputs.root == 'true' }} | |
run: pnpm run format:check | |
vitest: | |
name: Vitest | |
needs: paths-filter | |
if: ${{ needs.paths-filter.outputs.astro == 'true' }} | |
runs-on: ubuntu-24.04 | |
timeout-minutes: 15 | |
permissions: | |
contents: read | |
steps: | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
- name: Setup Node.js and pnpm | |
uses: ./.github/common/setup-node-pnpm | |
- name: Run Vitest on Astro | |
if: ${{ needs.paths-filter.outputs.astro == 'true' }} | |
run: pnpm run test --project sushichan.live | |
env: | |
PUBLIC_CLOUDINARY_API_KEY: ${{ secrets.PUBLIC_CLOUDINARY_API_KEY }} | |
CLOUDINARY_API_SECRET: ${{ secrets.CLOUDINARY_API_SECRET }} | |
PUBLIC_CLOUDINARY_CLOUD_NAME: ${{ secrets.PUBLIC_CLOUDINARY_CLOUD_NAME }} | |
astro-check: | |
name: Astro Check | |
needs: paths-filter | |
if: ${{ needs.paths-filter.outputs.astro == 'true' }} | |
runs-on: ubuntu-24.04 | |
timeout-minutes: 5 | |
permissions: | |
contents: read | |
steps: | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
- name: Setup Node.js and pnpm | |
uses: ./.github/common/setup-node-pnpm | |
- name: Run Astro Check | |
if: ${{ needs.paths-filter.outputs.astro == 'true' }} | |
run: pnpm --filter sushichan.live run check:astro | |
env: | |
PUBLIC_CLOUDINARY_API_KEY: ${{ secrets.PUBLIC_CLOUDINARY_API_KEY }} | |
CLOUDINARY_API_SECRET: ${{ secrets.CLOUDINARY_API_SECRET }} | |
PUBLIC_CLOUDINARY_CLOUD_NAME: ${{ secrets.PUBLIC_CLOUDINARY_CLOUD_NAME }} |