From 880d8806478cdeb79ceb89685f4de74484b73538 Mon Sep 17 00:00:00 2001 From: JuliaZel <91857302+JuliaZel@users.noreply.github.com> Date: Sun, 18 Feb 2024 13:44:29 -0500 Subject: [PATCH 01/24] First test action (Github Action - Node.js) --- .github/workflows/NodeChecks.yml | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .github/workflows/NodeChecks.yml diff --git a/.github/workflows/NodeChecks.yml b/.github/workflows/NodeChecks.yml new file mode 100644 index 00000000..af2e2677 --- /dev/null +++ b/.github/workflows/NodeChecks.yml @@ -0,0 +1,32 @@ +# Testing GitHub Action that Node dependencies build correctly (JuliaZel & sburchfield33) +# 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://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs + +name: Node.js CI + +on: + push: + branches: [ "sburchfield33-juliazel-githubactions" ] + pull_request: + branches: [ "sburchfield33-juliazel-githubactions" ] + +jobs: + build: + + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [18.x] + # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ + + steps: + - uses: actions/checkout@v3 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node-version }} + cache: 'npm' + - run: npm ci + - run: npm run build --if-present + - run: npm test From aad95cec099607d49fce97422c4c7bf0fe3a2c0b Mon Sep 17 00:00:00 2001 From: sburchfield33 Date: Sun, 18 Feb 2024 13:51:55 -0500 Subject: [PATCH 02/24] blah test Co-authored-by: JuliaZel --- src/app/private/[uid]/admin/elist/test/page.tsx | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 src/app/private/[uid]/admin/elist/test/page.tsx diff --git a/src/app/private/[uid]/admin/elist/test/page.tsx b/src/app/private/[uid]/admin/elist/test/page.tsx new file mode 100644 index 00000000..ba484555 --- /dev/null +++ b/src/app/private/[uid]/admin/elist/test/page.tsx @@ -0,0 +1,5 @@ +const Blah = () => { + return ; +}; + +export default Blah; From 238dae02f6bcbcb13dc7ebe2180f4b3021e8a97c Mon Sep 17 00:00:00 2001 From: JuliaZel <91857302+JuliaZel@users.noreply.github.com> Date: Sun, 18 Feb 2024 14:09:15 -0500 Subject: [PATCH 03/24] First iteration of prettier autoformat automation --- .github/workflows/prettier.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 .github/workflows/prettier.yml diff --git a/.github/workflows/prettier.yml b/.github/workflows/prettier.yml new file mode 100644 index 00000000..39a2b3e2 --- /dev/null +++ b/.github/workflows/prettier.yml @@ -0,0 +1,15 @@ +name: Prettier Action + +on: + push: + branches: [ "sburchfield33-juliazel-githubactions" ] + pull_request: + branches: [ "sburchfield33-juliazel-githubactions" ] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: creyD/prettier_action@v4.3 From 1a66e9dffa5009d611fd3a3356e32e17a1842e8c Mon Sep 17 00:00:00 2001 From: sburchfield33 Date: Sun, 18 Feb 2024 14:09:54 -0500 Subject: [PATCH 04/24] bad format test for prettier --- .../private/[uid]/admin/elist/test/page.tsx | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/src/app/private/[uid]/admin/elist/test/page.tsx b/src/app/private/[uid]/admin/elist/test/page.tsx index ba484555..27f3cdab 100644 --- a/src/app/private/[uid]/admin/elist/test/page.tsx +++ b/src/app/private/[uid]/admin/elist/test/page.tsx @@ -1,5 +1,22 @@ const Blah = () => { - return ; + return ; }; export default Blah; From 7acca1080ed97178d1377c70166c882fadc80345 Mon Sep 17 00:00:00 2001 From: sburchfield33 Date: Sun, 18 Feb 2024 14:16:23 -0500 Subject: [PATCH 05/24] test prettier actions again --- .github/workflows/prettier.yml | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/.github/workflows/prettier.yml b/.github/workflows/prettier.yml index 39a2b3e2..05fe9f1b 100644 --- a/.github/workflows/prettier.yml +++ b/.github/workflows/prettier.yml @@ -1,15 +1,16 @@ name: Prettier Action - + on: push: - branches: [ "sburchfield33-juliazel-githubactions" ] + branches: ["sburchfield33-juliazel-githubactions"] pull_request: - branches: [ "sburchfield33-juliazel-githubactions" ] + branches: ["sburchfield33-juliazel-githubactions"] jobs: - build: - + prettier: runs-on: ubuntu-latest steps: - - uses: creyD/prettier_action@v4.3 + - uses: creyD/prettier_action@v4.3 + with: + prettier_options: "--write **/*.tsx" \ No newline at end of file From baeb2c78bc6869b0a26470a043c28b44ddb8df9b Mon Sep 17 00:00:00 2001 From: sburchfield33 Date: Sun, 18 Feb 2024 14:21:16 -0500 Subject: [PATCH 06/24] test preitter again again --- .github/workflows/prettier.yml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/prettier.yml b/.github/workflows/prettier.yml index 05fe9f1b..9fadaaea 100644 --- a/.github/workflows/prettier.yml +++ b/.github/workflows/prettier.yml @@ -11,6 +11,12 @@ jobs: runs-on: ubuntu-latest steps: - - uses: creyD/prettier_action@v4.3 - with: - prettier_options: "--write **/*.tsx" \ No newline at end of file + - name: Checkout + uses: actions/checkout@v3 + with: + ref: ${{ github.head_ref }} + + - name: Prettify code + uses: creyD/prettier_action@v4.3 + with: + prettier_options: "--write **/*.tsx" \ No newline at end of file From 55497cdd3ad66ff1dc854973a3e2d8cdcb7f9501 Mon Sep 17 00:00:00 2001 From: sburchfield33 Date: Sun, 18 Feb 2024 14:23:16 -0500 Subject: [PATCH 07/24] fixed indentation of with and uses --- .github/workflows/prettier.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/prettier.yml b/.github/workflows/prettier.yml index 9fadaaea..386c0fe6 100644 --- a/.github/workflows/prettier.yml +++ b/.github/workflows/prettier.yml @@ -12,11 +12,11 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v3 - with: - ref: ${{ github.head_ref }} - + uses: actions/checkout@v3 + with: + ref: ${{ github.head_ref }} + - name: Prettify code - uses: creyD/prettier_action@v4.3 - with: - prettier_options: "--write **/*.tsx" \ No newline at end of file + uses: creyD/prettier_action@v4.3 + with: + prettier_options: "--write **/*.tsx" From 45edd62be607d1376237a7b2cbf5ef73897bb4b6 Mon Sep 17 00:00:00 2001 From: JuliaZel <91857302+JuliaZel@users.noreply.github.com> Date: Sun, 18 Feb 2024 14:27:24 -0500 Subject: [PATCH 08/24] Update checkout to include Node version --- .github/workflows/prettier.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/prettier.yml b/.github/workflows/prettier.yml index 386c0fe6..2b4c32c0 100644 --- a/.github/workflows/prettier.yml +++ b/.github/workflows/prettier.yml @@ -11,10 +11,11 @@ jobs: runs-on: ubuntu-latest steps: - - name: Checkout - uses: actions/checkout@v3 + - uses: actions/checkout@v4 + - name: Use Node.js + uses: actions/setup-node@v3 with: - ref: ${{ github.head_ref }} + node-version: '18.x' - name: Prettify code uses: creyD/prettier_action@v4.3 From 4b761eb57678fb7edb06427380ce8a53cd5fc192 Mon Sep 17 00:00:00 2001 From: JuliaZel <91857302+JuliaZel@users.noreply.github.com> Date: Sun, 18 Feb 2024 14:30:33 -0500 Subject: [PATCH 09/24] Add only_changed to true and fixed formatting --- .github/workflows/prettier.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/prettier.yml b/.github/workflows/prettier.yml index 2b4c32c0..e6667477 100644 --- a/.github/workflows/prettier.yml +++ b/.github/workflows/prettier.yml @@ -12,6 +12,9 @@ jobs: steps: - uses: actions/checkout@v4 + with: + ref: ${{ github.head_ref }} + fetch-depth: 0 - name: Use Node.js uses: actions/setup-node@v3 with: @@ -21,3 +24,5 @@ jobs: uses: creyD/prettier_action@v4.3 with: prettier_options: "--write **/*.tsx" + prettier_plugins: "prettier-plugin-tailwindcss" + only_changed: True From 1eebf2893c94b0035fd2222b250e25c7a9f87e81 Mon Sep 17 00:00:00 2001 From: sburchfield33 Date: Sun, 18 Feb 2024 14:31:02 -0500 Subject: [PATCH 10/24] changed random file --- src/app/private/[uid]/admin/elist/test/page.tsx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/app/private/[uid]/admin/elist/test/page.tsx b/src/app/private/[uid]/admin/elist/test/page.tsx index 27f3cdab..61e8579e 100644 --- a/src/app/private/[uid]/admin/elist/test/page.tsx +++ b/src/app/private/[uid]/admin/elist/test/page.tsx @@ -12,9 +12,7 @@ const Blah = () => { - - - + blah; }; From 7dc61bb0f08abf3e8bb1def34ce55d3fabf13ba1 Mon Sep 17 00:00:00 2001 From: JuliaZel <91857302+JuliaZel@users.noreply.github.com> Date: Sun, 18 Feb 2024 14:37:07 -0500 Subject: [PATCH 11/24] Specify prettier version to avoid tailwind plugin conflict --- .github/workflows/prettier.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/prettier.yml b/.github/workflows/prettier.yml index e6667477..f035c576 100644 --- a/.github/workflows/prettier.yml +++ b/.github/workflows/prettier.yml @@ -26,3 +26,4 @@ jobs: prettier_options: "--write **/*.tsx" prettier_plugins: "prettier-plugin-tailwindcss" only_changed: True + prettier_version: "^2.7.1" From 7a795396a0a4d43996b86dc748f19e232f7b06da Mon Sep 17 00:00:00 2001 From: JuliaZel <91857302+JuliaZel@users.noreply.github.com> Date: Sun, 18 Feb 2024 14:38:26 -0500 Subject: [PATCH 12/24] Fix formatting of prettier version setting --- .github/workflows/prettier.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/prettier.yml b/.github/workflows/prettier.yml index f035c576..4329f29d 100644 --- a/.github/workflows/prettier.yml +++ b/.github/workflows/prettier.yml @@ -26,4 +26,4 @@ jobs: prettier_options: "--write **/*.tsx" prettier_plugins: "prettier-plugin-tailwindcss" only_changed: True - prettier_version: "^2.7.1" + prettier_version: '2.7.1' From 968c877b24f6c20d91c666bb5b2f80647eeeb8b4 Mon Sep 17 00:00:00 2001 From: JuliaZel <91857302+JuliaZel@users.noreply.github.com> Date: Sun, 18 Feb 2024 14:41:04 -0500 Subject: [PATCH 13/24] Add npm install --- .github/workflows/prettier.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/prettier.yml b/.github/workflows/prettier.yml index 4329f29d..35735804 100644 --- a/.github/workflows/prettier.yml +++ b/.github/workflows/prettier.yml @@ -20,6 +20,9 @@ jobs: with: node-version: '18.x' + - name: NPM Install + run: npm i + - name: Prettify code uses: creyD/prettier_action@v4.3 with: From bafd9f6d752143e14233f86dd5624881a89c5d83 Mon Sep 17 00:00:00 2001 From: JuliaZel <91857302+JuliaZel@users.noreply.github.com> Date: Sun, 18 Feb 2024 14:42:43 -0500 Subject: [PATCH 14/24] Testing with v2 checkout --- .github/workflows/prettier.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/prettier.yml b/.github/workflows/prettier.yml index 35735804..967c929f 100644 --- a/.github/workflows/prettier.yml +++ b/.github/workflows/prettier.yml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v2 with: ref: ${{ github.head_ref }} fetch-depth: 0 From 7583e5b4ef5dc5de1942e3e8e56b606cf6e7db67 Mon Sep 17 00:00:00 2001 From: JuliaZel <91857302+JuliaZel@users.noreply.github.com> Date: Sun, 18 Feb 2024 14:43:53 -0500 Subject: [PATCH 15/24] Switch back to v4 --- .github/workflows/prettier.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/prettier.yml b/.github/workflows/prettier.yml index 967c929f..35735804 100644 --- a/.github/workflows/prettier.yml +++ b/.github/workflows/prettier.yml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 with: ref: ${{ github.head_ref }} fetch-depth: 0 From 859a845a908cb48b67addcba62f153f04717b15b Mon Sep 17 00:00:00 2001 From: JuliaZel <91857302+JuliaZel@users.noreply.github.com> Date: Sun, 18 Feb 2024 14:44:32 -0500 Subject: [PATCH 16/24] Fix naming --- .github/workflows/{NodeChecks.yml => check-node.yml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/workflows/{NodeChecks.yml => check-node.yml} (100%) diff --git a/.github/workflows/NodeChecks.yml b/.github/workflows/check-node.yml similarity index 100% rename from .github/workflows/NodeChecks.yml rename to .github/workflows/check-node.yml From 4449e4e0cd78d22608ca3f793929f1045b9db22c Mon Sep 17 00:00:00 2001 From: JuliaZel <91857302+JuliaZel@users.noreply.github.com> Date: Sun, 18 Feb 2024 14:49:00 -0500 Subject: [PATCH 17/24] wildcard in prettier version test --- .github/workflows/prettier.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/prettier.yml b/.github/workflows/prettier.yml index 35735804..9b081901 100644 --- a/.github/workflows/prettier.yml +++ b/.github/workflows/prettier.yml @@ -29,4 +29,4 @@ jobs: prettier_options: "--write **/*.tsx" prettier_plugins: "prettier-plugin-tailwindcss" only_changed: True - prettier_version: '2.7.1' + prettier_version: '2.x.x' From 3298e298fa61cbc22aa5a8d72f6938d4c56c58a0 Mon Sep 17 00:00:00 2001 From: JuliaZel <91857302+JuliaZel@users.noreply.github.com> Date: Wed, 21 Feb 2024 19:40:14 -0500 Subject: [PATCH 18/24] Initial unit testing file --- .github/workflows/unit-testing.yml | 32 ++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .github/workflows/unit-testing.yml diff --git a/.github/workflows/unit-testing.yml b/.github/workflows/unit-testing.yml new file mode 100644 index 00000000..b0fe538a --- /dev/null +++ b/.github/workflows/unit-testing.yml @@ -0,0 +1,32 @@ +# Testing GitHub Action that Node dependencies build correctly (JuliaZel & sburchfield33) +# 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://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs + +name: Unit Testing + +on: + push: + branches: [ "sburchfield33-juliazel-githubactions" ] + pull_request: + branches: [ "sburchfield33-juliazel-githubactions" ] + +jobs: + build: + + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [18.x] + # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ + + steps: + - uses: actions/checkout@v3 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node-version }} + cache: 'npm' + - run: npm ci + - run: npm run build --if-present + - run: npm run test From a1b341e38292d57dd0f6d0ea1e1837cff00ab0ef Mon Sep 17 00:00:00 2001 From: JuliaZel <91857302+JuliaZel@users.noreply.github.com> Date: Wed, 21 Feb 2024 19:42:05 -0500 Subject: [PATCH 19/24] Remove unnecessary build --- .github/workflows/unit-testing.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/unit-testing.yml b/.github/workflows/unit-testing.yml index b0fe538a..fcd1232b 100644 --- a/.github/workflows/unit-testing.yml +++ b/.github/workflows/unit-testing.yml @@ -28,5 +28,4 @@ jobs: node-version: ${{ matrix.node-version }} cache: 'npm' - run: npm ci - - run: npm run build --if-present - run: npm run test From 479548c2070a2b9b8cd2e69e65e978e0dbfcb3e8 Mon Sep 17 00:00:00 2001 From: JuliaZel <91857302+JuliaZel@users.noreply.github.com> Date: Wed, 21 Feb 2024 20:03:20 -0500 Subject: [PATCH 20/24] Remove check node workflow --- .github/workflows/check-node.yml | 32 -------------------------------- 1 file changed, 32 deletions(-) delete mode 100644 .github/workflows/check-node.yml diff --git a/.github/workflows/check-node.yml b/.github/workflows/check-node.yml deleted file mode 100644 index af2e2677..00000000 --- a/.github/workflows/check-node.yml +++ /dev/null @@ -1,32 +0,0 @@ -# Testing GitHub Action that Node dependencies build correctly (JuliaZel & sburchfield33) -# 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://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs - -name: Node.js CI - -on: - push: - branches: [ "sburchfield33-juliazel-githubactions" ] - pull_request: - branches: [ "sburchfield33-juliazel-githubactions" ] - -jobs: - build: - - runs-on: ubuntu-latest - - strategy: - matrix: - node-version: [18.x] - # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ - - steps: - - uses: actions/checkout@v3 - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v3 - with: - node-version: ${{ matrix.node-version }} - cache: 'npm' - - run: npm ci - - run: npm run build --if-present - - run: npm test From 57b1d33f667d29e2fcbf2ec87ff13f5f3a45ca9e Mon Sep 17 00:00:00 2001 From: JuliaZel <91857302+JuliaZel@users.noreply.github.com> Date: Wed, 21 Feb 2024 20:07:29 -0500 Subject: [PATCH 21/24] First secret setup for env vars --- .github/workflows/unit-testing.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/unit-testing.yml b/.github/workflows/unit-testing.yml index fcd1232b..a3a5ad0c 100644 --- a/.github/workflows/unit-testing.yml +++ b/.github/workflows/unit-testing.yml @@ -29,3 +29,5 @@ jobs: cache: 'npm' - run: npm ci - run: npm run test + env: + DATABASE_URL: ${{ secrets.DATABASE_URL }} From a43707e8de3d9be94aa75e605334e66a0696cd15 Mon Sep 17 00:00:00 2001 From: JuliaZel <91857302+JuliaZel@users.noreply.github.com> Date: Wed, 21 Feb 2024 20:10:21 -0500 Subject: [PATCH 22/24] Add all env variables into testing --- .github/workflows/unit-testing.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/unit-testing.yml b/.github/workflows/unit-testing.yml index a3a5ad0c..63536d8e 100644 --- a/.github/workflows/unit-testing.yml +++ b/.github/workflows/unit-testing.yml @@ -31,3 +31,8 @@ jobs: - run: npm run test env: DATABASE_URL: ${{ secrets.DATABASE_URL }} + NEXTAUTH_URL: ${{ secrets.NEXTAUTH_URL }} + NEXAUTH_SECRET: ${{ secrets.NEXTAUTH_SECRET }} + GOOGLE_CLIENT_SECRET: ${{ secrets.GOOGLE_CLIENT_SECRET }} + GOOGLE_CLIENT_ID: ${{ secrets.GOOGLE_CLIENT_ID }} + SENDGRID_API_KEY: ${{ secrets.SENDGRID_API_KEY }} From bd82d5996ea14eb1e9007c3cf0114765734e71b7 Mon Sep 17 00:00:00 2001 From: JuliaZel <91857302+JuliaZel@users.noreply.github.com> Date: Wed, 21 Feb 2024 20:11:56 -0500 Subject: [PATCH 23/24] Fix variable name for env --- .github/workflows/unit-testing.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/unit-testing.yml b/.github/workflows/unit-testing.yml index 63536d8e..877bae95 100644 --- a/.github/workflows/unit-testing.yml +++ b/.github/workflows/unit-testing.yml @@ -32,7 +32,7 @@ jobs: env: DATABASE_URL: ${{ secrets.DATABASE_URL }} NEXTAUTH_URL: ${{ secrets.NEXTAUTH_URL }} - NEXAUTH_SECRET: ${{ secrets.NEXTAUTH_SECRET }} + NEXTAUTH_SECRET: ${{ secrets.NEXTAUTH_SECRET }} GOOGLE_CLIENT_SECRET: ${{ secrets.GOOGLE_CLIENT_SECRET }} GOOGLE_CLIENT_ID: ${{ secrets.GOOGLE_CLIENT_ID }} SENDGRID_API_KEY: ${{ secrets.SENDGRID_API_KEY }} From c504dc3d433d39fe8df8382014a753ea39c8c1a8 Mon Sep 17 00:00:00 2001 From: JuliaZel <91857302+JuliaZel@users.noreply.github.com> Date: Wed, 21 Feb 2024 20:17:17 -0500 Subject: [PATCH 24/24] Added date comment --- .github/workflows/unit-testing.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/unit-testing.yml b/.github/workflows/unit-testing.yml index 877bae95..e4cb8ab0 100644 --- a/.github/workflows/unit-testing.yml +++ b/.github/workflows/unit-testing.yml @@ -1,7 +1,7 @@ # Testing GitHub Action that Node dependencies build correctly (JuliaZel & sburchfield33) # 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://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs - +# Edited: 02.2024 name: Unit Testing on: