Skip to content

Commit

Permalink
create github action ci test
Browse files Browse the repository at this point in the history
  • Loading branch information
atomic-kanta-sasaki committed Jun 22, 2024
1 parent 5384618 commit 0e91c1a
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Jest

on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review]

env:
WORKING_DIRECTORY: application

jobs:
Test:
name: Run test codes
if: |
github.event.pull_request.draft == false
&& !startsWith(github.head_ref, 'release')
&& !startsWith(github.head_ref, 'doc')
runs-on: ubuntu-latest
defaults:
run:
working-directory: ${{ env.WORKING_DIRECTORY }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install and cache nodejs
uses: actions/setup-node@v3
with:
node-version-file: ${{ env.WORKING_DIRECTORY }}/package.json
cache: 'npm'
cache-dependency-path: '**/package-lock.json'
- name: Install packages
run: npm ci
- name: Show coverage
run: npm test -- --bail --maxWorkers=100% --watchAll=false --coverage

0 comments on commit 0e91c1a

Please sign in to comment.