Skip to content

Commit

Permalink
chore: フロントエンドのCIでテストを実行 (#254)
Browse files Browse the repository at this point in the history
  • Loading branch information
r4ai authored Nov 18, 2024
1 parent cd8e509 commit a8aa991
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 0 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/frontend-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,3 +77,20 @@ jobs:
run: bun install --frozen-lockfile
- name: Check build
run: bun run build

test:
name: Test
runs-on: ubuntu-24.04
needs: changes
if: needs.changes.outputs.frontend == 'true' || needs.changes.outputs.workflows == 'true'
defaults:
run:
working-directory: ./frontend
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- name: Install tools
uses: jdx/mise-action@53d027c2e96fed8f955f5d95bff910a3e031cc58 # v2.1.6
- name: Install dependencies
run: bun install --frozen-lockfile
- name: Check test
run: bun run test
8 changes: 8 additions & 0 deletions frontend/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,14 @@ bun run dev
bun run build
```
#### テスト

次のコマンドでフロントエンドのテストを行います。

```sh
bun run test
```

#### リント

次のコマンドでフロントエンドのコードをESLintでリントします。
Expand Down
1 change: 1 addition & 0 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"scripts": {
"dev": "vite",
"build": "tsc -b && vite build",
"test": "vitest",
"lint": "eslint --cache --cache-location ./node_modules/.cache/eslint .",
"lint:write": "eslint --cache --cache-location ./node_modules/.cache/eslint --fix .",
"format": "prettier --ignore-path .gitignore --check .",
Expand Down

0 comments on commit a8aa991

Please sign in to comment.