Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 19 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,15 @@ on:
push:
branches:
- main
- deploy # Added deploy branch to trigger on push

pull_request:
branches:
- deploy

jobs:
"run-jest-tests":
runs-on: cs5500-self-hosted
runs-on: self-hosted
steps:
- name: Checkout Repository
uses: actions/checkout@v3
Expand All @@ -21,3 +22,20 @@ jobs:

- name: Run Tests
run: npm run test

"setup-database":
runs-on: self-hosted
# Only run this job when pushing to deploy branch
if: github.event_name == 'push' && github.ref == 'refs/heads/deploy'
steps:
- name: Checkout Repository
uses: actions/checkout@v3

- name: Install Dependencies
run: npm install

- name: Remove existing database
run: node remove_db.ts

- name: Insert sample data
run: node insert_sample_db.ts
2 changes: 1 addition & 1 deletion models/author.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import mongoose, { Schema, Document, Model, FilterQuery } from 'mongoose';
* @property date_of_birth - The author's date of birth.
* @property date_of_death - The author's date of death.
* @property name - The author's full name.
* @property lifespan - The author's lifespan.
* @property lifespan - The author's lifespan. 'a small change to be removed'
*/
export interface IAuthor extends Document {
first_name: string;
Expand Down
Loading