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
4 changes: 3 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:

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 +21,5 @@ jobs:

- name: Run Tests
run: npm run test


17 changes: 17 additions & 0 deletions .github/workflows/setUpDeploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: SetUpDeploy

on:
push:
branches:
- deploy
jobs:
"set_up_deploy":
runs-on: self-hosted
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Remove DB
run: npx ts-node remove_db.ts mongodb://127.0.0.1:27017/my_library_db
- name: Populate DB
run: npx ts-node insert_sample_data.ts mongodb://127.0.0.1:27017/my_library_db

4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,6 @@ First setup your machine or your teammate's machine to be the self hosted runner

Create a new workflow yml file that captures the following continuous integration requirement:

- When new changes are pushed to the deploy branch, the sample data should be setup using the scripts in `remove_db.ts` and `insert_sample_db.ts`.
- When new changes are pushed to the deploy branch, the sample data should be setup using the scripts in `remove_db.ts` and `insert_sample_db.ts`.

Test setup deploy, changed yaml files
Loading