From 5777361bedc0771e0ffb5447da39a03db6b0841e Mon Sep 17 00:00:00 2001 From: Hajin Kim <68993476+hajineats@users.noreply.github.com> Date: Tue, 15 Mar 2022 19:52:55 +1300 Subject: [PATCH 01/15] Create backend_ci.yml --- .github/workflows/backend_ci.yml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .github/workflows/backend_ci.yml diff --git a/.github/workflows/backend_ci.yml b/.github/workflows/backend_ci.yml new file mode 100644 index 00000000..e678d4f6 --- /dev/null +++ b/.github/workflows/backend_ci.yml @@ -0,0 +1,31 @@ +# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node +# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions + +name: backend_ci + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +jobs: + build: + + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [16.x] + # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ + + steps: + - uses: actions/checkout@v2 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v2 + with: + node-version: ${{ matrix.node-version }} + cache: 'npm' + - run: npm --prefix ./backend run lint + - run: npm --prefix ./backend run test + - run: npm --prefix ./backend run build --if-present From ba0a260fbd81cd6796f7074cba902b346d158f96 Mon Sep 17 00:00:00 2001 From: Hajin Kim <68993476+hajineats@users.noreply.github.com> Date: Tue, 15 Mar 2022 19:55:15 +1300 Subject: [PATCH 02/15] Update backend_ci.yml --- .github/workflows/backend_ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/backend_ci.yml b/.github/workflows/backend_ci.yml index e678d4f6..2abe41b6 100644 --- a/.github/workflows/backend_ci.yml +++ b/.github/workflows/backend_ci.yml @@ -26,6 +26,7 @@ jobs: with: node-version: ${{ matrix.node-version }} cache: 'npm' + - run: npm --prefix ./backend i - run: npm --prefix ./backend run lint - run: npm --prefix ./backend run test - run: npm --prefix ./backend run build --if-present From 227333d7be435398a9d9fc819e1eb328de4cc313 Mon Sep 17 00:00:00 2001 From: Hajin Kim <68993476+hajineats@users.noreply.github.com> Date: Thu, 17 Mar 2022 00:02:43 +1300 Subject: [PATCH 03/15] Update backend_ci.yml --- .github/workflows/backend_ci.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/backend_ci.yml b/.github/workflows/backend_ci.yml index 2abe41b6..59699598 100644 --- a/.github/workflows/backend_ci.yml +++ b/.github/workflows/backend_ci.yml @@ -20,6 +20,15 @@ jobs: # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ steps: + - name: create env file + run: | + touch .env + echo FIREBASE_TEST_AUTH_EMAIL=${{ secrets.FIREBASE_TEST_AUTH_EMAIL }} >> .env + echo FIREBASE_TEST_AUTH_KEY=${{ secrets.FIREBASE_TEST_AUTH_KEY }} >> .env + echo FIREBASE_TEST_AUTH_PASS=${{ secrets.FIREBASE_TEST_AUTH_PASS }} >> .env + echo MONGODB_URI=${{ secrets.MONGODB_URI }} >> .env + echo PORT=${{ secrets.PORT }} >> .env + - uses: actions/checkout@v2 - name: Use Node.js ${{ matrix.node-version }} uses: actions/setup-node@v2 From 646e21952af0dac9da36c1a6e7c5d2470b084987 Mon Sep 17 00:00:00 2001 From: Hajin Kim <68993476+hajineats@users.noreply.github.com> Date: Thu, 17 Mar 2022 00:07:39 +1300 Subject: [PATCH 04/15] Update backend_ci.yml --- .github/workflows/backend_ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/backend_ci.yml b/.github/workflows/backend_ci.yml index 59699598..2ec2386e 100644 --- a/.github/workflows/backend_ci.yml +++ b/.github/workflows/backend_ci.yml @@ -20,8 +20,9 @@ jobs: # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ steps: - - name: create env file + - name: create env file in backend run: | + cd ./backend touch .env echo FIREBASE_TEST_AUTH_EMAIL=${{ secrets.FIREBASE_TEST_AUTH_EMAIL }} >> .env echo FIREBASE_TEST_AUTH_KEY=${{ secrets.FIREBASE_TEST_AUTH_KEY }} >> .env From dffd00015df23dca5952c96fd5badb81de74eadc Mon Sep 17 00:00:00 2001 From: Hajin Kim <68993476+hajineats@users.noreply.github.com> Date: Thu, 17 Mar 2022 00:10:34 +1300 Subject: [PATCH 05/15] Update backend_ci.yml --- .github/workflows/backend_ci.yml | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/.github/workflows/backend_ci.yml b/.github/workflows/backend_ci.yml index 2ec2386e..9d18ebeb 100644 --- a/.github/workflows/backend_ci.yml +++ b/.github/workflows/backend_ci.yml @@ -21,14 +21,7 @@ jobs: steps: - name: create env file in backend - run: | - cd ./backend - touch .env - echo FIREBASE_TEST_AUTH_EMAIL=${{ secrets.FIREBASE_TEST_AUTH_EMAIL }} >> .env - echo FIREBASE_TEST_AUTH_KEY=${{ secrets.FIREBASE_TEST_AUTH_KEY }} >> .env - echo FIREBASE_TEST_AUTH_PASS=${{ secrets.FIREBASE_TEST_AUTH_PASS }} >> .env - echo MONGODB_URI=${{ secrets.MONGODB_URI }} >> .env - echo PORT=${{ secrets.PORT }} >> .env + run: cd ./backend; touch .env; echo FIREBASE_TEST_AUTH_EMAIL=${{ secrets.FIREBASE_TEST_AUTH_EMAIL }} >> .env; echo FIREBASE_TEST_AUTH_KEY=${{ secrets.FIREBASE_TEST_AUTH_KEY }} >> .env; echo FIREBASE_TEST_AUTH_PASS=${{ secrets.FIREBASE_TEST_AUTH_PASS }} >> .env; echo MONGODB_URI=${{ secrets.MONGODB_URI }} >> .env; echo PORT=${{ secrets.PORT }} >> .env - uses: actions/checkout@v2 - name: Use Node.js ${{ matrix.node-version }} From eb1ccbf751baeff0e3e40d5d25d58ca1b1df3ceb Mon Sep 17 00:00:00 2001 From: Hajin Kim <68993476+hajineats@users.noreply.github.com> Date: Thu, 17 Mar 2022 00:13:11 +1300 Subject: [PATCH 06/15] Update backend_ci.yml --- .github/workflows/backend_ci.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/backend_ci.yml b/.github/workflows/backend_ci.yml index 9d18ebeb..770fdeff 100644 --- a/.github/workflows/backend_ci.yml +++ b/.github/workflows/backend_ci.yml @@ -20,9 +20,7 @@ jobs: # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ steps: - - name: create env file in backend - run: cd ./backend; touch .env; echo FIREBASE_TEST_AUTH_EMAIL=${{ secrets.FIREBASE_TEST_AUTH_EMAIL }} >> .env; echo FIREBASE_TEST_AUTH_KEY=${{ secrets.FIREBASE_TEST_AUTH_KEY }} >> .env; echo FIREBASE_TEST_AUTH_PASS=${{ secrets.FIREBASE_TEST_AUTH_PASS }} >> .env; echo MONGODB_URI=${{ secrets.MONGODB_URI }} >> .env; echo PORT=${{ secrets.PORT }} >> .env - + - run: cd ./backend; touch .env; echo FIREBASE_TEST_AUTH_EMAIL=${{ secrets.FIREBASE_TEST_AUTH_EMAIL }} >> .env; echo FIREBASE_TEST_AUTH_KEY=${{ secrets.FIREBASE_TEST_AUTH_KEY }} >> .env; echo FIREBASE_TEST_AUTH_PASS=${{ secrets.FIREBASE_TEST_AUTH_PASS }} >> .env; echo MONGODB_URI=${{ secrets.MONGODB_URI }} >> .env; echo PORT=${{ secrets.PORT }} >> .env; - uses: actions/checkout@v2 - name: Use Node.js ${{ matrix.node-version }} uses: actions/setup-node@v2 From a3c697fd771a02863bcb51dcd3f3483fda7d3ba8 Mon Sep 17 00:00:00 2001 From: Hajin Kim <68993476+hajineats@users.noreply.github.com> Date: Thu, 17 Mar 2022 00:14:12 +1300 Subject: [PATCH 07/15] Update backend_ci.yml --- .github/workflows/backend_ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/backend_ci.yml b/.github/workflows/backend_ci.yml index 770fdeff..2abe41b6 100644 --- a/.github/workflows/backend_ci.yml +++ b/.github/workflows/backend_ci.yml @@ -20,7 +20,6 @@ jobs: # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ steps: - - run: cd ./backend; touch .env; echo FIREBASE_TEST_AUTH_EMAIL=${{ secrets.FIREBASE_TEST_AUTH_EMAIL }} >> .env; echo FIREBASE_TEST_AUTH_KEY=${{ secrets.FIREBASE_TEST_AUTH_KEY }} >> .env; echo FIREBASE_TEST_AUTH_PASS=${{ secrets.FIREBASE_TEST_AUTH_PASS }} >> .env; echo MONGODB_URI=${{ secrets.MONGODB_URI }} >> .env; echo PORT=${{ secrets.PORT }} >> .env; - uses: actions/checkout@v2 - name: Use Node.js ${{ matrix.node-version }} uses: actions/setup-node@v2 From 6351b32618f53fc318091828a7a075562c0719e2 Mon Sep 17 00:00:00 2001 From: Hajin Kim <68993476+hajineats@users.noreply.github.com> Date: Thu, 17 Mar 2022 00:20:22 +1300 Subject: [PATCH 08/15] Update backend_ci.yml --- .github/workflows/backend_ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/backend_ci.yml b/.github/workflows/backend_ci.yml index 2abe41b6..16b396d3 100644 --- a/.github/workflows/backend_ci.yml +++ b/.github/workflows/backend_ci.yml @@ -26,6 +26,7 @@ jobs: with: node-version: ${{ matrix.node-version }} cache: 'npm' + - run: cd ./backend; touch .env; - run: npm --prefix ./backend i - run: npm --prefix ./backend run lint - run: npm --prefix ./backend run test From a0128954760c57b4f069f801173b6725e458c79a Mon Sep 17 00:00:00 2001 From: Hajin Kim <68993476+hajineats@users.noreply.github.com> Date: Thu, 17 Mar 2022 00:21:32 +1300 Subject: [PATCH 09/15] Update backend_ci.yml --- .github/workflows/backend_ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/backend_ci.yml b/.github/workflows/backend_ci.yml index 16b396d3..c70b2c80 100644 --- a/.github/workflows/backend_ci.yml +++ b/.github/workflows/backend_ci.yml @@ -26,7 +26,7 @@ jobs: with: node-version: ${{ matrix.node-version }} cache: 'npm' - - run: cd ./backend; touch .env; + - run: cd ./backend; touch .env; echo "FIREBASE_TEST_AUTH_EMAIL=${{ secrets.FIREBASE_TEST_AUTH_EMAIL }}" >> .env; - run: npm --prefix ./backend i - run: npm --prefix ./backend run lint - run: npm --prefix ./backend run test From 6346cf39e98bd2bfd2634cc737bb183030841a65 Mon Sep 17 00:00:00 2001 From: Hajin Kim <68993476+hajineats@users.noreply.github.com> Date: Thu, 17 Mar 2022 00:22:36 +1300 Subject: [PATCH 10/15] Update backend_ci.yml --- .github/workflows/backend_ci.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/backend_ci.yml b/.github/workflows/backend_ci.yml index c70b2c80..4bee32c7 100644 --- a/.github/workflows/backend_ci.yml +++ b/.github/workflows/backend_ci.yml @@ -26,7 +26,11 @@ jobs: with: node-version: ${{ matrix.node-version }} cache: 'npm' - - run: cd ./backend; touch .env; echo "FIREBASE_TEST_AUTH_EMAIL=${{ secrets.FIREBASE_TEST_AUTH_EMAIL }}" >> .env; + - run: | + cd ./backend + touch .env + echo "FIREBASE_TEST_AUTH_EMAIL=${{ secrets.FIREBASE_TEST_AUTH_EMAIL }}" >> .env + - run: npm --prefix ./backend i - run: npm --prefix ./backend run lint - run: npm --prefix ./backend run test From 130d8195bdb91dae0941dd4583626da2fb7a30b7 Mon Sep 17 00:00:00 2001 From: Hajin Kim <68993476+hajineats@users.noreply.github.com> Date: Thu, 17 Mar 2022 00:25:34 +1300 Subject: [PATCH 11/15] Update backend_ci.yml --- .github/workflows/backend_ci.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/backend_ci.yml b/.github/workflows/backend_ci.yml index 4bee32c7..94428d70 100644 --- a/.github/workflows/backend_ci.yml +++ b/.github/workflows/backend_ci.yml @@ -26,10 +26,15 @@ jobs: with: node-version: ${{ matrix.node-version }} cache: 'npm' - - run: | + - name: "Create .env file from secrets" + run: | cd ./backend touch .env echo "FIREBASE_TEST_AUTH_EMAIL=${{ secrets.FIREBASE_TEST_AUTH_EMAIL }}" >> .env + echo "FIREBASE_TEST_AUTH_KEY=${{ secrets.FIREBASE_TEST_AUTH_KEY }}" >> .env + echo "FIREBASE_TEST_AUTH_PASS=${{ secrets.FIREBASE_TEST_AUTH_PASS }}" >> .env + echo "MONGODB_URI=${{ secrets.MONGODB_URI }}" >> .env + echo "PORT=${{ secrets.PORT }}" >> .env - run: npm --prefix ./backend i - run: npm --prefix ./backend run lint From 617b1af5e0cee78f409a9dac0ef351b382503df0 Mon Sep 17 00:00:00 2001 From: Hajin Kim <68993476+hajineats@users.noreply.github.com> Date: Thu, 17 Mar 2022 00:35:12 +1300 Subject: [PATCH 12/15] Update backend_ci.yml --- .github/workflows/backend_ci.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/backend_ci.yml b/.github/workflows/backend_ci.yml index 94428d70..d38eec60 100644 --- a/.github/workflows/backend_ci.yml +++ b/.github/workflows/backend_ci.yml @@ -32,9 +32,6 @@ jobs: touch .env echo "FIREBASE_TEST_AUTH_EMAIL=${{ secrets.FIREBASE_TEST_AUTH_EMAIL }}" >> .env echo "FIREBASE_TEST_AUTH_KEY=${{ secrets.FIREBASE_TEST_AUTH_KEY }}" >> .env - echo "FIREBASE_TEST_AUTH_PASS=${{ secrets.FIREBASE_TEST_AUTH_PASS }}" >> .env - echo "MONGODB_URI=${{ secrets.MONGODB_URI }}" >> .env - echo "PORT=${{ secrets.PORT }}" >> .env - run: npm --prefix ./backend i - run: npm --prefix ./backend run lint From a50add5e58fce76873c64c2d1ca6916c46b638db Mon Sep 17 00:00:00 2001 From: Hajin Kim <68993476+hajineats@users.noreply.github.com> Date: Thu, 17 Mar 2022 00:36:36 +1300 Subject: [PATCH 13/15] Update backend_ci.yml --- .github/workflows/backend_ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/backend_ci.yml b/.github/workflows/backend_ci.yml index d38eec60..caa05020 100644 --- a/.github/workflows/backend_ci.yml +++ b/.github/workflows/backend_ci.yml @@ -32,6 +32,8 @@ jobs: touch .env echo "FIREBASE_TEST_AUTH_EMAIL=${{ secrets.FIREBASE_TEST_AUTH_EMAIL }}" >> .env echo "FIREBASE_TEST_AUTH_KEY=${{ secrets.FIREBASE_TEST_AUTH_KEY }}" >> .env + echo "FIREBASE_TEST_AUTH_PASS=${{ secrets.FIREBASE_TEST_AUTH_PASS }}" >> .env + echo "MONGODB_URI=${{ secrets.MONGODB_URI }}" >> .env - run: npm --prefix ./backend i - run: npm --prefix ./backend run lint From 1fe45d4fd644b916df805e8a493a35ca482ab5dd Mon Sep 17 00:00:00 2001 From: Hajin Kim <68993476+hajineats@users.noreply.github.com> Date: Thu, 17 Mar 2022 00:37:51 +1300 Subject: [PATCH 14/15] Update backend_ci.yml --- .github/workflows/backend_ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/backend_ci.yml b/.github/workflows/backend_ci.yml index caa05020..91a8a5d5 100644 --- a/.github/workflows/backend_ci.yml +++ b/.github/workflows/backend_ci.yml @@ -33,7 +33,7 @@ jobs: echo "FIREBASE_TEST_AUTH_EMAIL=${{ secrets.FIREBASE_TEST_AUTH_EMAIL }}" >> .env echo "FIREBASE_TEST_AUTH_KEY=${{ secrets.FIREBASE_TEST_AUTH_KEY }}" >> .env echo "FIREBASE_TEST_AUTH_PASS=${{ secrets.FIREBASE_TEST_AUTH_PASS }}" >> .env - echo "MONGODB_URI=${{ secrets.MONGODB_URI }}" >> .env + echo "PORT=${{ secrets.PORT }}" >> .env - run: npm --prefix ./backend i - run: npm --prefix ./backend run lint From 31df80acd37d6e95388f40825f0636751c6c410d Mon Sep 17 00:00:00 2001 From: Hajin Kim <68993476+hajineats@users.noreply.github.com> Date: Thu, 17 Mar 2022 00:38:26 +1300 Subject: [PATCH 15/15] Update backend_ci.yml --- .github/workflows/backend_ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/backend_ci.yml b/.github/workflows/backend_ci.yml index 91a8a5d5..ca53ba06 100644 --- a/.github/workflows/backend_ci.yml +++ b/.github/workflows/backend_ci.yml @@ -38,4 +38,3 @@ jobs: - run: npm --prefix ./backend i - run: npm --prefix ./backend run lint - run: npm --prefix ./backend run test - - run: npm --prefix ./backend run build --if-present