diff --git a/.github/workflows/check.yaml b/.github/workflows/check.yaml new file mode 100644 index 0000000..add652e --- /dev/null +++ b/.github/workflows/check.yaml @@ -0,0 +1,28 @@ +name: Check Package + +on: + workflow_call: + +jobs: + ci: + runs-on: ubuntu-latest + timeout-minutes: 5 + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Install pnpm + run: npm install -g pnpm + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version-file: '.node-version' + cache: 'pnpm' + + - name: Install dependencies + run: pnpm install + + - name: Run tests + run: pnpm test diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 31e63f7..6cf313d 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -1,4 +1,4 @@ -name: CI on pull request +name: CI for before & after Pull Request Merge on: pull_request: @@ -7,24 +7,5 @@ on: - main jobs: - ci: - runs-on: ubuntu-latest - - steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: Install pnpm - run: npm install -g pnpm - - - name: Setup Node.js - uses: actions/setup-node@v4 - with: - node-version-file: '.node-version' - cache: 'pnpm' - - - name: Install dependencies - run: pnpm install - - - name: Run tests - run: pnpm test + call-common-checks: + uses: ./.github/workflows/check.yaml