From 64c3803727d0c9025dd5a9c2de7001dcbeec74e1 Mon Sep 17 00:00:00 2001 From: Teguh Rijanandi <43981051+teguh02@users.noreply.github.com> Date: Mon, 1 Jul 2024 20:36:00 +0700 Subject: [PATCH 1/4] Create test.yml --- .github/workflows/test.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..52ce9cd --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,28 @@ +name: Jest Tests + +on: + push: + branches: + - master + pull_request: + branches: + - master + +jobs: + test: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Set up Node.js + uses: actions/setup-node@v2 + with: + node-version: '14' + + - name: Install dependencies + run: npm install + + - name: Run Jest tests + run: npm test From f44f8f9daf3f360493389ec3b96511aedeedea7d Mon Sep 17 00:00:00 2001 From: Teguh Rijanandi <43981051+teguh02@users.noreply.github.com> Date: Mon, 1 Jul 2024 20:41:34 +0700 Subject: [PATCH 2/4] change using bun instead --- .github/workflows/test.yml | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 52ce9cd..fceb485 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -16,13 +16,12 @@ jobs: - name: Checkout code uses: actions/checkout@v2 - - name: Set up Node.js - uses: actions/setup-node@v2 - with: - node-version: '14' + - name: Install bun + run: | + curl -fsSL https://bun.sh/install | bash - name: Install dependencies - run: npm install + run: bun install - name: Run Jest tests - run: npm test + run: bun test From 5ef4e9ad0b2cc55f95da926a6fc1e8822749e05b Mon Sep 17 00:00:00 2001 From: Teguh Rijanandi <43981051+teguh02@users.noreply.github.com> Date: Mon, 1 Jul 2024 20:42:35 +0700 Subject: [PATCH 3/4] Update test.yml --- .github/workflows/test.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index fceb485..c50e07e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -20,6 +20,9 @@ jobs: run: | curl -fsSL https://bun.sh/install | bash + - name: Set up bun environment + run: bun env setup + - name: Install dependencies run: bun install From 794370c3de37ac4cecb578bd273881646e2910b8 Mon Sep 17 00:00:00 2001 From: Teguh Rijanandi <43981051+teguh02@users.noreply.github.com> Date: Mon, 1 Jul 2024 20:44:35 +0700 Subject: [PATCH 4/4] Update test.yml --- .github/workflows/test.yml | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index c50e07e..9d415bb 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -16,12 +16,8 @@ jobs: - name: Checkout code uses: actions/checkout@v2 - - name: Install bun - run: | - curl -fsSL https://bun.sh/install | bash - - - name: Set up bun environment - run: bun env setup + - name: Set up bun + uses: oven-sh/setup-bun@v1 - name: Install dependencies run: bun install