From b5b34550c5d7d55f274c864be82b449ddfc4bad0 Mon Sep 17 00:00:00 2001 From: alattalatta Date: Mon, 17 Jul 2023 23:39:08 +0900 Subject: [PATCH] Separate test/release workflow --- .../workflows/{main-test.yml => release.yml} | 7 +++--- .github/workflows/test-mr.yml | 24 +++++++++++++++++++ 2 files changed, 27 insertions(+), 4 deletions(-) rename .github/workflows/{main-test.yml => release.yml} (91%) create mode 100644 .github/workflows/test-mr.yml diff --git a/.github/workflows/main-test.yml b/.github/workflows/release.yml similarity index 91% rename from .github/workflows/main-test.yml rename to .github/workflows/release.yml index 2d61465..ec74c34 100644 --- a/.github/workflows/main-test.yml +++ b/.github/workflows/release.yml @@ -1,13 +1,12 @@ # This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node # For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions -name: Node.js CI +name: Release on: push: - branches: [main] - pull_request: - branches: [main] + branches: + - main jobs: build: diff --git a/.github/workflows/test-mr.yml b/.github/workflows/test-mr.yml new file mode 100644 index 0000000..f9daf8a --- /dev/null +++ b/.github/workflows/test-mr.yml @@ -0,0 +1,24 @@ +# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node +# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions + +name: Test + +on: + pull_request: + branches: + - main + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: pnpm/action-setup@v2 + with: + version: 8 + - uses: actions/setup-node@v3 + with: + node-version: 18.x + cache: 'pnpm' + - run: pnpm i + - run: pnpm test