From c786b066f01b9986b554cb8049fb43c777cedb51 Mon Sep 17 00:00:00 2001 From: eldpswp99 Date: Thu, 12 Oct 2023 20:06:51 +0900 Subject: [PATCH] workflow test --- backend/.github/workflows/test.yml | 39 ++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 backend/.github/workflows/test.yml diff --git a/backend/.github/workflows/test.yml b/backend/.github/workflows/test.yml new file mode 100644 index 0000000..1d2d451 --- /dev/null +++ b/backend/.github/workflows/test.yml @@ -0,0 +1,39 @@ +name: 테스트 + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +jobs: + test: + runs-on: ubuntu-20.04 + + services: + postgres: + image: postgres + env: + POSTGRES_USER: postgres + POSTGRES_PASSWORD: postgres + POSTGRES_DB: test + options: >- + --health-cmd pg_isready + --health-interval 10s + --health-timeout 5s + --health-retries 5 + ports: + - 5432:5432 + redis: + image: redis + ports: + - 6379:6379 + + steps: + - uses: actions/checkout@v3 + - name: Use Node.js 20 + uses: actions/setup-node@v3 + - name: 의존성 설치 + run: npm install + - name: 테스트 + run: npm test \ No newline at end of file