From c8def1d0a251293a810a7e2cee5594acf1443030 Mon Sep 17 00:00:00 2001 From: Keith Valin Date: Fri, 19 Mar 2021 14:55:13 -0400 Subject: [PATCH] Updated the build action to use docker-compose file for test CI --- .github/workflows/ci.yml | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a0f01c42..999f301b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -5,11 +5,12 @@ on: [push, pull_request] jobs: ci-checks: runs-on: ubuntu-latest - container: - image: node:10.13 - steps: - uses: actions/checkout@v1 + - name: Setup Node.js + uses: actions/setup-node@v2 + with: + node-version: '10.13' - name: Setup cache uses: actions/cache@v2 with: @@ -17,7 +18,14 @@ jobs: key: ${{ runner.os }}-${{ hashFiles('**/package-lock.json') }} - name: Fetch packages run: npm ci + - name: Setup Test Environment + run: | + docker-compose up -d database + docker-compose up database_seed - name: Run unit tests run: npm test + - name: Tear down test environment + run: | + docker-compose down - name: Build production build run: npm run build \ No newline at end of file