From 210cd9a053d9189358fbca5c3ae7f43546bb1aa1 Mon Sep 17 00:00:00 2001 From: Heorhii Date: Mon, 8 May 2023 22:59:45 +0200 Subject: [PATCH] testing with pg and Redis containers --- .github/workflows/test.yml | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 97b80d14..20645c2e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,6 +1,8 @@ name: Testing CI -on: pull_request +on: + - pull_request + - push # not for landing jobs: build: @@ -9,24 +11,33 @@ jobs: strategy: matrix: node: - - 14 - 16 - 18 - 19 + - 20 os: - ubuntu-latest steps: - uses: actions/checkout@v3 + + - name: Start docker containers + run: | + docker-compose -f docker-compose.yml up -d pg-example redis-example + sleep 10 # wait for database to be ready + - name: Use Node.js ${{ matrix.node }} uses: actions/setup-node@v3 with: node-version: ${{ matrix.node }} + - uses: actions/cache@v3 with: path: ~/.npm key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} restore-keys: | ${{ runner.os }}-node- + - run: npm ci + - run: npm test