From bb1363fdbc7123d413dac5a87e4383e6c7209117 Mon Sep 17 00:00:00 2001 From: atomic-kanta-sasaki Date: Sat, 22 Jun 2024 22:50:53 +0900 Subject: [PATCH] fix github action --- .github/workflows/test.yml | 37 +++++++++++++++++-------------------- 1 file changed, 17 insertions(+), 20 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 1aafb18..471d195 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -11,26 +11,23 @@ env: WORKING_DIRECTORY: . 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 }} + build: + reuns-on: ubuntu-latest + + strategy: + matrix: + node-version: [18.12.1] + steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Install and cache nodejs - uses: actions/setup-node@v3 + - uses: actions/checkout@v4 + + - name: Cache node modules + uses: actions/cache@v4 with: - node-version-file: ${{ env.WORKING_DIRECTORY }}/package.json - cache: 'npm' - cache-dependency-path: '**/package-lock.json' - - name: Install packages + path: ~/.npm + + - name: Install dependencies run: npm ci - - name: Show coverage - run: npm test -- --bail --maxWorkers=100% --watchAll=false --coverage \ No newline at end of file + + - name: Run Jest + run: npm run test -- --ci --passWithNoTests