-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
➡️ merge pull request #14 from devsoc-unsw/feature/login
Signup/Login Feature + Integration Tests + CI Pipeline setup
- Loading branch information
Showing
22 changed files
with
4,380 additions
and
135 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,17 @@ | ||
name: "Build" | ||
description: "Sets up the repository" | ||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Set up pnpm | ||
uses: pnpm/action-setup@v2 | ||
with: | ||
version: latest | ||
run_install: | | ||
- cwd: './backend' | ||
- name: Install Node.js | ||
uses: actions/setup-node@v3 | ||
- name: Install dependencies | ||
shell: bash | ||
working-directory: ./backend | ||
run: pnpm install |
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,11 @@ | ||
name: 'Docker-Compose Setup' | ||
description: 'Sets up docker-compose' | ||
runs: | ||
using: 'composite' | ||
steps: | ||
- name: Download Docker-Compose plugin | ||
shell: bash | ||
run: curl -SL https://github.com/docker/compose/releases/download/v2.16.0/docker-compose-linux-x86_64 -o /usr/local/bin/docker-compose | ||
- name: Make plugin executable | ||
shell: bash | ||
run: sudo chmod +x /usr/local/bin/docker-compose |
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,26 @@ | ||
name: Tests | ||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- main | ||
- feature/login | ||
pull_request: | ||
branches: | ||
- main | ||
- feature/login | ||
env: | ||
DATABASE_URL: postgres://postgres:postgres@localhost:5432 | ||
NODE_ENV: test | ||
jobs: | ||
integration-tests: | ||
runs-on: ubuntu-latest | ||
defaults: | ||
run: | ||
working-directory: ./backend | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: ./.github/actions/build | ||
- uses: ./.github/actions/docker-compose | ||
- name: Run tests | ||
run: pnpm run test:int |
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
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,3 @@ | ||
DATABASE_URL="postgres://postgres:postgres@localhost:5432" | ||
DIRECT_URL="postgres://postgres:postgres@localhost:5432" | ||
NODE_ENV=test |
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 |
---|---|---|
@@ -1,3 +1,3 @@ | ||
node_modules | ||
# Keep environment variables out of version control | ||
.env | ||
.env |
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,16 @@ | ||
services: | ||
db: | ||
image: postgres:14.1-alpine | ||
restart: always | ||
environment: | ||
- POSTGRES_USER=postgres | ||
- POSTGRES_PASSWORD=postgres | ||
- POSTGRES_DB=local_db | ||
ports: | ||
- '5432:5432' | ||
volumes: | ||
- db:/var/lib/postgresql/data | ||
|
||
volumes: | ||
db: | ||
driver: local |
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
Oops, something went wrong.