Skip to content

Commit e418a7d

Browse files
SharpDevOps10thebladehit
authored andcommitted
testing: added github actions setup for tests
1 parent a2d6ef0 commit e418a7d

File tree

2 files changed

+36
-0
lines changed

2 files changed

+36
-0
lines changed

.github/actions/install/action.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
name: 'Install Node and dependencies'
2+
3+
description: 'Set up Node and dependencies'
4+
runs:
5+
using: composite
6+
steps:
7+
- name: Use Node.js 20.x
8+
uses: actions/setup-node@v3
9+
with:
10+
node-version: '20.x'
11+
- name: Install dependencies
12+
shell: bash
13+
run: npm install

.github/workflows/build.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Build
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- main
8+
9+
jobs:
10+
integration-test:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout
14+
uses: actions/checkout@v3
15+
- name: Install Node and dependencies
16+
uses: ./.github/actions/install
17+
- name: Start PostgreSQL Database
18+
run: |
19+
docker-compose up -d && sleep 5s
20+
- name: Start migration
21+
run: npm run test:migrate
22+
- name: Run integration tests
23+
run: npm run test:integration

0 commit comments

Comments
 (0)