diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 9877da5..e802080 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -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 @@ -21,3 +21,5 @@ jobs: - name: Run Tests run: npm run test + + diff --git a/.github/workflows/setUpDeploy.yml b/.github/workflows/setUpDeploy.yml new file mode 100644 index 0000000..eb48531 --- /dev/null +++ b/.github/workflows/setUpDeploy.yml @@ -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 + diff --git a/README.md b/README.md index 29a4ae9..23b9281 100644 --- a/README.md +++ b/README.md @@ -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`. \ No newline at end of file +- 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 \ No newline at end of file