From b81f53fbdee412a9c4d0fa111500f929b37b176b Mon Sep 17 00:00:00 2001 From: whatacotton Date: Sat, 6 Apr 2024 22:28:06 +0900 Subject: [PATCH] fix: workflow add test --- .github/workflows/testing.yml | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index effdb6d..1d48ac0 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -7,7 +7,7 @@ on: branches: ["develop"] jobs: - build: + small_tests: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 @@ -19,8 +19,17 @@ jobs: - name: execute small test run: | cd internal/cart - go test -run TestCartUtils_InspectCart + go test -run TestCartUtils + midium_tests: + runs-on: ubuntu-latest + needs: small_tests + steps: + - uses: actions/checkout@v3 + - name: Set up Go + uses: actions/setup-go@v4 + with: + go-version: "1.22.1" - name: Setup databases run: | sudo apt-get update @@ -29,3 +38,10 @@ jobs: echo "deb [signed-by=/usr/share/keyrings/stripe.gpg] https://packages.stripe.dev/stripe-cli-debian-local stable main" | sudo tee -a /etc/apt/sources.list.d/stripe.list sudo apt update sudo apt install stripe + bash rest_run.sh & + sleep 10 + - name: execute midium test + run: | + cd internal/cart + go test -run TestRepository + go test -run TestCartRequests