From 367caadb20a131f79ddf63117a9726984d8d7808 Mon Sep 17 00:00:00 2001 From: NoxMetenis <87176727+NoxMetentis@users.noreply.github.com> Date: Thu, 7 Sep 2023 13:54:03 +0800 Subject: [PATCH 01/16] Delete .github/workflows/nodejs.yml Deletes the nodejs.yml to create a new workflow --- .github/workflows/nodejs.yml | 45 ------------------------------------ 1 file changed, 45 deletions(-) delete mode 100644 .github/workflows/nodejs.yml diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml deleted file mode 100644 index 310f3b213..000000000 --- a/.github/workflows/nodejs.yml +++ /dev/null @@ -1,45 +0,0 @@ -# This workflow will do a clean install of node dependencies, 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: Node.js CI - -on: [push, pull_request] - -jobs: - build: - runs-on: ubuntu-22.04 - - steps: - - uses: actions/checkout@v3 - - name: Use Node.js 18 - uses: actions/setup-node@v3 - with: - node-version: 18 - - run: npm ci - - name: lint - run: npm run lint - - name: build - run: npx webpack --mode=production - env: - PUBLIC_PATH: '/AncientBeast/' - - name: Upload build artifact - uses: actions/upload-artifact@v1 - with: - name: deploy - path: deploy - - deploy: - runs-on: ubuntu-22.04 - needs: build - if: github.ref == 'refs/heads/master' - steps: - - name: Download build artifact - uses: actions/download-artifact@v1 - with: - name: deploy - # Uses: https://github.com/peaceiris/actions-gh-pages - - name: Deploy - uses: peaceiris/actions-gh-pages@v3 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: ./deploy From 7eeeab4d52826a73cc1482e9d3fbea7d479d2986 Mon Sep 17 00:00:00 2001 From: Leeaun1127 <71190798+Leeaun1127@users.noreply.github.com> Date: Thu, 7 Sep 2023 15:11:42 +0800 Subject: [PATCH 02/16] Create testing-v1.yaml --- .github/workflows/testing.yaml | 35 ++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .github/workflows/testing.yaml diff --git a/.github/workflows/testing.yaml b/.github/workflows/testing.yaml new file mode 100644 index 000000000..e5733be26 --- /dev/null +++ b/.github/workflows/testing.yaml @@ -0,0 +1,35 @@ +name: Build and configure + +on: [push, pull_request] + +jobs: + build: + runs-on: ubuntu-22.04 + + steps: + - uses: actions/checkout@v3 + - name: Use Node.js 18 + uses: actions/setup-node@v3 + with: + node-version: 18 + - run: npm ci + - name: lint + run: npm run lint + - name: build + run: npx webpack --mode=production + env: + PUBLIC_PATH: '/AncientBeast/' + - name: Upload build artifact + uses: actions/upload-artifact@v1 + + test: + runs-on: ubuntu-22.04 + + steps: + - name: Use Node.js 18 + uses: actions/setup-node@v3 + with: + node-version: 18 + - run: npm install + - name: run tests + run: npm test From cf272e2f4216052c3bff36fd7588a85211ae2488 Mon Sep 17 00:00:00 2001 From: denniswong1225 <90010803+denniswong1225@users.noreply.github.com> Date: Thu, 7 Sep 2023 16:29:36 +0800 Subject: [PATCH 03/16] Update testing.yaml add deploy --- .github/workflows/testing.yaml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/.github/workflows/testing.yaml b/.github/workflows/testing.yaml index e5733be26..00de1ba19 100644 --- a/.github/workflows/testing.yaml +++ b/.github/workflows/testing.yaml @@ -21,6 +21,9 @@ jobs: PUBLIC_PATH: '/AncientBeast/' - name: Upload build artifact uses: actions/upload-artifact@v1 + with: + name: deploy + path: deploy test: runs-on: ubuntu-22.04 @@ -33,3 +36,19 @@ jobs: - run: npm install - name: run tests run: npm test + + deploy: + runs-on: ubuntu-22.04 + needs: build + if: github.ref == 'refs/heads/master' + steps: + - name: Download build artifact + uses: actions/download-artifact@v1 + with: + name: deploy + # Uses: https://github.com/peaceiris/actions-gh-pages + - name: Deploy + uses: peaceiris/actions-gh-pages@v3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./deploy From ec0839789e1e9df8237921bb3e457357a2222bde Mon Sep 17 00:00:00 2001 From: denniswong1225 <90010803+denniswong1225@users.noreply.github.com> Date: Thu, 7 Sep 2023 23:19:47 +0800 Subject: [PATCH 04/16] Update testing.yaml implement deployment --- .github/workflows/testing.yaml | 58 +++++++++++++++++++++++++++------- 1 file changed, 46 insertions(+), 12 deletions(-) diff --git a/.github/workflows/testing.yaml b/.github/workflows/testing.yaml index 00de1ba19..3b91c43a8 100644 --- a/.github/workflows/testing.yaml +++ b/.github/workflows/testing.yaml @@ -1,4 +1,4 @@ -name: Build and configure +name: Build and Configure on: [push, pull_request] @@ -13,8 +13,6 @@ jobs: with: node-version: 18 - run: npm ci - - name: lint - run: npm run lint - name: build run: npx webpack --mode=production env: @@ -24,18 +22,54 @@ jobs: with: name: deploy path: deploy - - test: + + + codeanalysis: runs-on: ubuntu-22.04 + needs: build - steps: - - name: Use Node.js 18 - uses: actions/setup-node@v3 + steps: + - name: Checkout code + uses: actions/checkout@v2 with: - node-version: 18 - - run: npm install - - name: run tests - run: npm test + path: /home/runner/work/AncientBeast/AncientBeast + + + - run: npm ci + - name: Static Code Analysis (ESLint) + run: npm run lint > eslint-report.log + - name: Static Code Analysis (ESLint) + run: cat eslint-report.log + - name: Archive ESLint Report + uses: actions/upload-artifact@v2 + with: + name: eslint-report + path: eslint-report.log + + test: + runs-on: ubuntu-22.04 + needs: codeanalysis + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Use Node.js 18 + uses: actions/setup-node@v2 + with: + node-version: 18 + + - name: Install dependencies + run: npm ci + + - name: Lint code + run: npm run lint + + - name: Build for testing + run: npm run build:dev + + - name: Run tests + run: npm test deploy: runs-on: ubuntu-22.04 From f0e60af74f834b87145aa1229354bd55a5f72b82 Mon Sep 17 00:00:00 2001 From: denniswong1225 <90010803+denniswong1225@users.noreply.github.com> Date: Thu, 7 Sep 2023 23:25:25 +0800 Subject: [PATCH 05/16] Update testing.yaml implement deployment --- .github/workflows/testing.yaml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/testing.yaml b/.github/workflows/testing.yaml index 3b91c43a8..796b4d483 100644 --- a/.github/workflows/testing.yaml +++ b/.github/workflows/testing.yaml @@ -19,9 +19,7 @@ jobs: PUBLIC_PATH: '/AncientBeast/' - name: Upload build artifact uses: actions/upload-artifact@v1 - with: - name: deploy - path: deploy + codeanalysis: From dfb6e0116c8403aa5ea9eb084b0f04063c0360d3 Mon Sep 17 00:00:00 2001 From: denniswong1225 <90010803+denniswong1225@users.noreply.github.com> Date: Thu, 7 Sep 2023 23:30:26 +0800 Subject: [PATCH 06/16] Update testing.yaml --- .github/workflows/testing.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/testing.yaml b/.github/workflows/testing.yaml index 796b4d483..465dbc3ce 100644 --- a/.github/workflows/testing.yaml +++ b/.github/workflows/testing.yaml @@ -19,6 +19,9 @@ jobs: PUBLIC_PATH: '/AncientBeast/' - name: Upload build artifact uses: actions/upload-artifact@v1 + with: + name: deploy + path: deploy From 3d667beee04f5d064379d38210fe98c8390dab8b Mon Sep 17 00:00:00 2001 From: denniswong1225 <90010803+denniswong1225@users.noreply.github.com> Date: Thu, 7 Sep 2023 23:36:44 +0800 Subject: [PATCH 07/16] Update testing.yaml --- .github/workflows/testing.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/testing.yaml b/.github/workflows/testing.yaml index 465dbc3ce..ef6904012 100644 --- a/.github/workflows/testing.yaml +++ b/.github/workflows/testing.yaml @@ -19,9 +19,7 @@ jobs: PUBLIC_PATH: '/AncientBeast/' - name: Upload build artifact uses: actions/upload-artifact@v1 - with: - name: deploy - path: deploy + @@ -71,6 +69,8 @@ jobs: - name: Run tests run: npm test + + deploy: runs-on: ubuntu-22.04 From 669bcd2292c99733cd4a385c8f5faa8286a65758 Mon Sep 17 00:00:00 2001 From: denniswong1225 <90010803+denniswong1225@users.noreply.github.com> Date: Thu, 7 Sep 2023 23:47:41 +0800 Subject: [PATCH 08/16] Update testing.yaml --- .github/workflows/testing.yaml | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/.github/workflows/testing.yaml b/.github/workflows/testing.yaml index ef6904012..8335f3035 100644 --- a/.github/workflows/testing.yaml +++ b/.github/workflows/testing.yaml @@ -73,17 +73,6 @@ jobs: deploy: - runs-on: ubuntu-22.04 - needs: build - if: github.ref == 'refs/heads/master' - steps: - - name: Download build artifact - uses: actions/download-artifact@v1 - with: - name: deploy - # Uses: https://github.com/peaceiris/actions-gh-pages - - name: Deploy - uses: peaceiris/actions-gh-pages@v3 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: ./deploy + runs-on: ubuntu-22.04 + echo build deployed; + From 45b74abf4fe9ce83debb33a5e70d012a44692dd1 Mon Sep 17 00:00:00 2001 From: denniswong1225 <90010803+denniswong1225@users.noreply.github.com> Date: Thu, 7 Sep 2023 23:52:16 +0800 Subject: [PATCH 09/16] Update testing.yaml --- .github/workflows/testing.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/testing.yaml b/.github/workflows/testing.yaml index 8335f3035..434fc55f1 100644 --- a/.github/workflows/testing.yaml +++ b/.github/workflows/testing.yaml @@ -73,6 +73,5 @@ jobs: deploy: - runs-on: ubuntu-22.04 echo build deployed; From 959aaa32be7745ea8147a129898a17ee01b4fd2d Mon Sep 17 00:00:00 2001 From: denniswong1225 <90010803+denniswong1225@users.noreply.github.com> Date: Thu, 7 Sep 2023 23:55:36 +0800 Subject: [PATCH 10/16] Update testing.yaml --- .github/workflows/testing.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/testing.yaml b/.github/workflows/testing.yaml index 434fc55f1..5044b2702 100644 --- a/.github/workflows/testing.yaml +++ b/.github/workflows/testing.yaml @@ -73,5 +73,8 @@ jobs: deploy: - echo build deployed; + runs-on: ubuntu-22.04 + needs: build + + run: echo "deploy"; From b322f23e335c1625bc5524e26fe56580e3d9e274 Mon Sep 17 00:00:00 2001 From: denniswong1225 <90010803+denniswong1225@users.noreply.github.com> Date: Thu, 7 Sep 2023 23:59:55 +0800 Subject: [PATCH 11/16] Update testing.yaml --- .github/workflows/testing.yaml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/testing.yaml b/.github/workflows/testing.yaml index 5044b2702..d478d7fca 100644 --- a/.github/workflows/testing.yaml +++ b/.github/workflows/testing.yaml @@ -69,12 +69,13 @@ jobs: - name: Run tests run: npm test - deploy: runs-on: ubuntu-22.04 needs: build - - run: echo "deploy"; + if: github.ref == 'refs/heads/master' + steps: + - name: Deploy completed + run: echo "Deploy completed" From 4e9134717612dfe616d9c14805fddf7e32e3c5b6 Mon Sep 17 00:00:00 2001 From: denniswong1225 <90010803+denniswong1225@users.noreply.github.com> Date: Fri, 8 Sep 2023 00:01:05 +0800 Subject: [PATCH 12/16] Update testing.yaml --- .github/workflows/testing.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/testing.yaml b/.github/workflows/testing.yaml index d478d7fca..4b9949e85 100644 --- a/.github/workflows/testing.yaml +++ b/.github/workflows/testing.yaml @@ -73,7 +73,7 @@ jobs: deploy: runs-on: ubuntu-22.04 - needs: build + needs: test if: github.ref == 'refs/heads/master' steps: - name: Deploy completed From 9991f4f2bd2ad2d78f55c47072f50df9c069762b Mon Sep 17 00:00:00 2001 From: denniswong1225 <90010803+denniswong1225@users.noreply.github.com> Date: Fri, 8 Sep 2023 00:02:47 +0800 Subject: [PATCH 13/16] Update testing.yaml --- .github/workflows/testing.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/testing.yaml b/.github/workflows/testing.yaml index 4b9949e85..2cb97dd47 100644 --- a/.github/workflows/testing.yaml +++ b/.github/workflows/testing.yaml @@ -19,6 +19,9 @@ jobs: PUBLIC_PATH: '/AncientBeast/' - name: Upload build artifact uses: actions/upload-artifact@v1 + with: + name: deploy + path: deploy From fc76ab37c318dad93780e2ec1b710912410ce55e Mon Sep 17 00:00:00 2001 From: denniswong1225 <90010803+denniswong1225@users.noreply.github.com> Date: Fri, 8 Sep 2023 00:06:33 +0800 Subject: [PATCH 14/16] Update testing.yaml --- .github/workflows/testing.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/testing.yaml b/.github/workflows/testing.yaml index 2cb97dd47..611324e03 100644 --- a/.github/workflows/testing.yaml +++ b/.github/workflows/testing.yaml @@ -77,7 +77,6 @@ jobs: deploy: runs-on: ubuntu-22.04 needs: test - if: github.ref == 'refs/heads/master' steps: - name: Deploy completed run: echo "Deploy completed" From 86fe0fa55359b9465c53de244108ad8f95053f49 Mon Sep 17 00:00:00 2001 From: denniswong1225 <90010803+denniswong1225@users.noreply.github.com> Date: Fri, 8 Sep 2023 00:19:17 +0800 Subject: [PATCH 15/16] Rename testing.yaml to config.yaml --- .github/workflows/{testing.yaml => config.yaml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/workflows/{testing.yaml => config.yaml} (100%) diff --git a/.github/workflows/testing.yaml b/.github/workflows/config.yaml similarity index 100% rename from .github/workflows/testing.yaml rename to .github/workflows/config.yaml From a8234c3607ad0b22e6890fae50ed8d69148841cf Mon Sep 17 00:00:00 2001 From: Dread Knight Date: Tue, 12 Sep 2023 14:52:59 +0300 Subject: [PATCH 16/16] reduced whitespacing --- .github/workflows/config.yaml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/.github/workflows/config.yaml b/.github/workflows/config.yaml index 611324e03..69521e9e9 100644 --- a/.github/workflows/config.yaml +++ b/.github/workflows/config.yaml @@ -23,9 +23,6 @@ jobs: name: deploy path: deploy - - - codeanalysis: runs-on: ubuntu-22.04 needs: build @@ -35,7 +32,6 @@ jobs: uses: actions/checkout@v2 with: path: /home/runner/work/AncientBeast/AncientBeast - - run: npm ci - name: Static Code Analysis (ESLint) @@ -73,11 +69,9 @@ jobs: - name: Run tests run: npm test - deploy: runs-on: ubuntu-22.04 needs: test steps: - name: Deploy completed run: echo "Deploy completed" -