Skip to content

Commit

Permalink
added github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
EricFrancis12 committed Jun 27, 2024
1 parent ad50b37 commit 15f9c94
Show file tree
Hide file tree
Showing 3 changed files with 78 additions and 1 deletion.
43 changes: 43 additions & 0 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: End-To-End Test

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 18.17.0

- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: '^1.22.3'

- name: Run docker-compose
uses: hoverkraft-tech/compose-action@v2.0.1
with:
compose-file: './docker-compose.yml'

- run: npm ci

- run: prisma generate
- run: make db push
- run: make seed

- run: npm run build

- run: make dev api
- run: npm start

- run: npm run e2e

34 changes: 34 additions & 0 deletions .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Unit Tests

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 18.17.0

- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: '^1.22.3'

- run: npm ci

- run: npm run build

- run: make dev api
- run: npm start

- run: npm test

2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ db push:
npx prisma db push

dev api:
go run .
go run api.dev.go

0 comments on commit 15f9c94

Please sign in to comment.