Skip to content

Commit

Permalink
Merge pull request #41 from 0918nobita/separate-gha-workflow
Browse files Browse the repository at this point in the history
ビルド・Lint・フォーマット確認用にそれぞれワークフローを定義した
  • Loading branch information
0918nobita authored Dec 29, 2023
2 parents 3910c6d + a74c823 commit 240d99b
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 6 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Build

on:
push:
paths:
- '.github/workflows/build.yml'
- 'src/**/*.ts'
- 'package.json'
- 'package-lock.json'
- 'tsconfig.json'
- 'vite.config.ts'

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: 16.15.0
- run: npm ci
- run: npm run build
22 changes: 22 additions & 0 deletions .github/workflows/format-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Check for un-formatted files

on:
push:
paths:
- '.editorconfig'
- '**/*.js'
- '**/*.json'
- '**/*.md'
- '**/*.ts'
- '**/*.yml'

jobs:
format-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16.15.0
- run: npm ci
- run: npm run format:check
9 changes: 3 additions & 6 deletions .github/workflows/ci.yml → .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,23 @@
name: CI
name: Lint

on:
push:
paths:
- '.github/workflows/**'
- '.github/workflows/lint.yml'
- 'src/**/*.ts'
- '.editorconfig'
- 'eslint.config.js'
- 'package.json'
- 'package-lock.json'
- 'tsconfig.json'
- 'vite.config.ts'

jobs:
ci:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: 16.15.0
- run: npm ci
- run: npm run build
- run: npm run lint
- run: npm run format:check

0 comments on commit 240d99b

Please sign in to comment.