-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: MayanjaAndrew <[email protected]>
- Loading branch information
1 parent
d9247b8
commit a282907
Showing
2 changed files
with
80 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
name: "Setup" | ||
description: "Sets up environment" | ||
inputs: | ||
ssh-private-key: | ||
description: "SSH key used for private git clone" | ||
required: true | ||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Check out repository code | ||
uses: actions/checkout@v3 | ||
- name: Use Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: "18.13.0" | ||
cache: "npm" | ||
registry-url: "https://npm.pkg.github.com" | ||
- name: Install dependencies | ||
run: | | ||
npm install --immutable --immutable-cache --check-cache | ||
shell: bash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
name: CI/CD Checks | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
pull_request: | ||
|
||
jobs: | ||
format-check: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Check out repository code | ||
uses: actions/checkout@v3 | ||
- name: Setup environment (node, npm install) | ||
uses: ./.github/actions/setup | ||
- name: Format check | ||
run: npm run format:check | ||
|
||
build-check: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Check out repository code | ||
uses: actions/checkout@v3 | ||
- name: Setup environment (node, npm install) | ||
uses: ./.github/actions/setup | ||
- name: Build check | ||
run: npm run build | ||
|
||
server-test: | ||
services: | ||
postgres: | ||
image: postgres | ||
env: | ||
POSTGRES_PASSWORD: pg | ||
POSTGRES_DB: flow_test | ||
options: >- | ||
--health-cmd pg_isready | ||
--health-interval 10s | ||
--health-timeout 5s | ||
--health-retries 5 | ||
ports: | ||
- 5432:5432 | ||
|
||
runs-on: ubuntu-latest | ||
timeout-minutes: 5 | ||
env: | ||
DATABASE_URL: postgresql://postgres@localhost:5432/flow | ||
|
||
steps: | ||
- name: Check out repository code | ||
uses: actions/checkout@v3 | ||
- name: Setup environment (node, npm install) | ||
uses: ./.github/actions/setup | ||
- name: Prisma Gen | ||
run: npm run gen -w apps/server | ||
- name: Test check | ||
run: npm run test -w apps/server |