From 263265ed86ba4dc7d5a5c3a19583b2809a0d4781 Mon Sep 17 00:00:00 2001 From: Max Sobkov Date: Tue, 3 May 2022 22:34:16 -0400 Subject: [PATCH 1/7] testing mongo credential fix in pipeline --- .github/workflows/scheduleshare-github-actions.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/scheduleshare-github-actions.yml b/.github/workflows/scheduleshare-github-actions.yml index 725426a..d882321 100644 --- a/.github/workflows/scheduleshare-github-actions.yml +++ b/.github/workflows/scheduleshare-github-actions.yml @@ -1,5 +1,7 @@ name: ScheduleShare CI on: [push] +env: + MONGO_CREDENTIALS: ${{ MONGO_CREDENTIALS }} jobs: ScheduleShare-Test-and-Lint: runs-on: ubuntu-latest From e564edcd800d90e13f9ca75dc23ab2c642fb4877 Mon Sep 17 00:00:00 2001 From: Max Sobkov Date: Tue, 3 May 2022 22:53:34 -0400 Subject: [PATCH 2/7] Better? --- .github/workflows/scheduleshare-github-actions.yml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/scheduleshare-github-actions.yml b/.github/workflows/scheduleshare-github-actions.yml index d882321..15ebe09 100644 --- a/.github/workflows/scheduleshare-github-actions.yml +++ b/.github/workflows/scheduleshare-github-actions.yml @@ -1,10 +1,13 @@ name: ScheduleShare CI on: [push] env: - MONGO_CREDENTIALS: ${{ MONGO_CREDENTIALS }} + MONGO_CREDENTIALS: ${{ secrets.MONGO_CREDENTIALS }} jobs: ScheduleShare-Test-and-Lint: runs-on: ubuntu-latest + defaults: + run: + working-directory: ./backend steps: - run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event." - run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub!" @@ -17,12 +20,11 @@ jobs: run: | ls ${{ github.workspace }} - name: "Backend: Install modules" - working-directory: ./backend run: yarn - name: "Backend: Run linter" - working-directory: ./backend run: yarn lint - name: "Backend: Run tests" - working-directory: ./backend - run: yarn test + run: + echo "MONGO_CREDENTIALS:${{env.MONGO_CREDENTIALS}} > secret.env" + yarn test - run: echo "🍏 This job's status is ${{ job.status }}." \ No newline at end of file From 15be3c42045579627d09539458c514f44ed17fa1 Mon Sep 17 00:00:00 2001 From: Max Sobkov Date: Tue, 3 May 2022 22:54:38 -0400 Subject: [PATCH 3/7] fixed directory --- .github/workflows/scheduleshare-github-actions.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/scheduleshare-github-actions.yml b/.github/workflows/scheduleshare-github-actions.yml index 15ebe09..b760cfa 100644 --- a/.github/workflows/scheduleshare-github-actions.yml +++ b/.github/workflows/scheduleshare-github-actions.yml @@ -7,7 +7,7 @@ jobs: runs-on: ubuntu-latest defaults: run: - working-directory: ./backend + working-directory: /backend steps: - run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event." - run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub!" From 5933476d957198fcf3b7111e92def3cb2eb31f4a Mon Sep 17 00:00:00 2001 From: Max Sobkov Date: Tue, 3 May 2022 22:55:33 -0400 Subject: [PATCH 4/7] fixed directory --- .github/workflows/scheduleshare-github-actions.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/scheduleshare-github-actions.yml b/.github/workflows/scheduleshare-github-actions.yml index b760cfa..19b3752 100644 --- a/.github/workflows/scheduleshare-github-actions.yml +++ b/.github/workflows/scheduleshare-github-actions.yml @@ -7,7 +7,7 @@ jobs: runs-on: ubuntu-latest defaults: run: - working-directory: /backend + working-directory: backend steps: - run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event." - run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub!" From 2a7dd39aafd2faaae7d4ee4ef70cdaa7161c51ff Mon Sep 17 00:00:00 2001 From: Max Sobkov Date: Tue, 3 May 2022 22:56:35 -0400 Subject: [PATCH 5/7] fixed directory --- .github/workflows/scheduleshare-github-actions.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/scheduleshare-github-actions.yml b/.github/workflows/scheduleshare-github-actions.yml index 19b3752..7237bbd 100644 --- a/.github/workflows/scheduleshare-github-actions.yml +++ b/.github/workflows/scheduleshare-github-actions.yml @@ -7,7 +7,7 @@ jobs: runs-on: ubuntu-latest defaults: run: - working-directory: backend + working-directory: ../backend steps: - run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event." - run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub!" From ad69194be9de508003d0566523306763df4c3f1d Mon Sep 17 00:00:00 2001 From: Max Sobkov Date: Tue, 3 May 2022 23:01:15 -0400 Subject: [PATCH 6/7] fixed directory --- .github/workflows/scheduleshare-github-actions.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/scheduleshare-github-actions.yml b/.github/workflows/scheduleshare-github-actions.yml index 7237bbd..99ebb86 100644 --- a/.github/workflows/scheduleshare-github-actions.yml +++ b/.github/workflows/scheduleshare-github-actions.yml @@ -5,9 +5,6 @@ env: jobs: ScheduleShare-Test-and-Lint: runs-on: ubuntu-latest - defaults: - run: - working-directory: ../backend steps: - run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event." - run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub!" @@ -20,10 +17,13 @@ jobs: run: | ls ${{ github.workspace }} - name: "Backend: Install modules" + working-directory: ./dronuts-backend run: yarn - name: "Backend: Run linter" + working-directory: ./dronuts-backend run: yarn lint - name: "Backend: Run tests" + working-directory: ./dronuts-backend run: echo "MONGO_CREDENTIALS:${{env.MONGO_CREDENTIALS}} > secret.env" yarn test From f4d1d2e8ec385784afa2c81c37524703fcc3c1b2 Mon Sep 17 00:00:00 2001 From: Max Sobkov Date: Tue, 3 May 2022 23:02:04 -0400 Subject: [PATCH 7/7] I'm dumb --- .github/workflows/scheduleshare-github-actions.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/scheduleshare-github-actions.yml b/.github/workflows/scheduleshare-github-actions.yml index 99ebb86..fd4ad90 100644 --- a/.github/workflows/scheduleshare-github-actions.yml +++ b/.github/workflows/scheduleshare-github-actions.yml @@ -17,13 +17,13 @@ jobs: run: | ls ${{ github.workspace }} - name: "Backend: Install modules" - working-directory: ./dronuts-backend + working-directory: ./backend run: yarn - name: "Backend: Run linter" - working-directory: ./dronuts-backend + working-directory: ./backend run: yarn lint - name: "Backend: Run tests" - working-directory: ./dronuts-backend + working-directory: ./backend run: echo "MONGO_CREDENTIALS:${{env.MONGO_CREDENTIALS}} > secret.env" yarn test