From ca6b55d34d92acdcf35b8e0c7222ca48cb853a95 Mon Sep 17 00:00:00 2001 From: Alina Chen Date: Tue, 22 Oct 2024 15:12:54 -0400 Subject: [PATCH 01/14] added frontend repo to workflow --- .github/workflows/azure-deploy-f24.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/azure-deploy-f24.yml b/.github/workflows/azure-deploy-f24.yml index e655394c8a..3f1c64fd4e 100644 --- a/.github/workflows/azure-deploy-f24.yml +++ b/.github/workflows/azure-deploy-f24.yml @@ -7,6 +7,7 @@ on: push: branches: - f24 + - frontend-deployment workflow_dispatch: concurrency: @@ -31,6 +32,11 @@ jobs: uses: actions/setup-node@v3 with: node-version: '20.17.0' + + - name: Checkout theme repository + uses: actions/checkout@v4 + with: + repository: 'cmu-313/nodebb-frontend-f24-team-bulbasaur' - name: Set up NodeBB run: | @@ -43,6 +49,7 @@ jobs: "redis:host": "${{ secrets.REDIS_HOST }}", "redis:port": "6379", "redis:password": "${{ secrets.REDIS_PASSWORD }}" }' + npm install ../nodebb-frontend-f24-team-bulbasaur - name: 'Deploy to Azure Web App' id: deploy-to-webapp From daf4d1b0c216285ef0255b780896a795ed2e5b40 Mon Sep 17 00:00:00 2001 From: Alina Chen Date: Tue, 22 Oct 2024 15:21:42 -0400 Subject: [PATCH 02/14] temp remove npm install frontend --- .github/workflows/azure-deploy-f24.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/azure-deploy-f24.yml b/.github/workflows/azure-deploy-f24.yml index 3f1c64fd4e..1b6e383d3f 100644 --- a/.github/workflows/azure-deploy-f24.yml +++ b/.github/workflows/azure-deploy-f24.yml @@ -49,7 +49,6 @@ jobs: "redis:host": "${{ secrets.REDIS_HOST }}", "redis:port": "6379", "redis:password": "${{ secrets.REDIS_PASSWORD }}" }' - npm install ../nodebb-frontend-f24-team-bulbasaur - name: 'Deploy to Azure Web App' id: deploy-to-webapp From bdb269cc8d05ff1ce39ad0c828eeb827e69df5c4 Mon Sep 17 00:00:00 2001 From: Alina Chen Date: Tue, 22 Oct 2024 15:28:06 -0400 Subject: [PATCH 03/14] move theme repo checkout after nodebb setup --- .github/workflows/azure-deploy-f24.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/azure-deploy-f24.yml b/.github/workflows/azure-deploy-f24.yml index 1b6e383d3f..2e6418d352 100644 --- a/.github/workflows/azure-deploy-f24.yml +++ b/.github/workflows/azure-deploy-f24.yml @@ -32,11 +32,6 @@ jobs: uses: actions/setup-node@v3 with: node-version: '20.17.0' - - - name: Checkout theme repository - uses: actions/checkout@v4 - with: - repository: 'cmu-313/nodebb-frontend-f24-team-bulbasaur' - name: Set up NodeBB run: | @@ -49,6 +44,11 @@ jobs: "redis:host": "${{ secrets.REDIS_HOST }}", "redis:port": "6379", "redis:password": "${{ secrets.REDIS_PASSWORD }}" }' + + - name: Checkout theme repository + uses: actions/checkout@v4 + with: + repository: 'cmu-313/nodebb-frontend-f24-team-bulbasaur' - name: 'Deploy to Azure Web App' id: deploy-to-webapp From 90077b27d2f95af03a75c6b2317d160c6f5fec97 Mon Sep 17 00:00:00 2001 From: Alina Chen Date: Tue, 22 Oct 2024 15:48:12 -0400 Subject: [PATCH 04/14] install frontend in workflow --- .github/workflows/azure-deploy-f24.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/azure-deploy-f24.yml b/.github/workflows/azure-deploy-f24.yml index 2e6418d352..c8efaccc89 100644 --- a/.github/workflows/azure-deploy-f24.yml +++ b/.github/workflows/azure-deploy-f24.yml @@ -49,6 +49,14 @@ jobs: uses: actions/checkout@v4 with: repository: 'cmu-313/nodebb-frontend-f24-team-bulbasaur' + + - name: Set up frontend theme + run: | + npm install ../nodebb-frontend-f24-team-bulbasaur + + - name: Rebuild NodeBB tpl + run: | + ./nodebb build tpl - name: 'Deploy to Azure Web App' id: deploy-to-webapp From 170c156ff591403403effc39ca8dfb8a0a672ab7 Mon Sep 17 00:00:00 2001 From: Alina Chen Date: Tue, 22 Oct 2024 15:58:05 -0400 Subject: [PATCH 05/14] updated frontend installation in workflow --- .github/workflows/azure-deploy-f24.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/azure-deploy-f24.yml b/.github/workflows/azure-deploy-f24.yml index c8efaccc89..92aa9ef05c 100644 --- a/.github/workflows/azure-deploy-f24.yml +++ b/.github/workflows/azure-deploy-f24.yml @@ -52,7 +52,7 @@ jobs: - name: Set up frontend theme run: | - npm install ../nodebb-frontend-f24-team-bulbasaur + npm install nodebb-frontend-f24-team-bulbasaur - name: Rebuild NodeBB tpl run: | From 1d9b7f77a575c658181fdd9197a74456b3a4a2f4 Mon Sep 17 00:00:00 2001 From: Alina Chen Date: Tue, 22 Oct 2024 16:13:27 -0400 Subject: [PATCH 06/14] locating frontend directory in workflow --- .github/workflows/azure-deploy-f24.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/azure-deploy-f24.yml b/.github/workflows/azure-deploy-f24.yml index 92aa9ef05c..2b6705e717 100644 --- a/.github/workflows/azure-deploy-f24.yml +++ b/.github/workflows/azure-deploy-f24.yml @@ -28,6 +28,10 @@ jobs: steps: - uses: actions/checkout@v4 + - name: Current team directory + run: | + pwd + - name: Set up Node.js version uses: actions/setup-node@v3 with: @@ -49,6 +53,9 @@ jobs: uses: actions/checkout@v4 with: repository: 'cmu-313/nodebb-frontend-f24-team-bulbasaur' + run: | + pwd + - name: Set up frontend theme run: | From 3802ccda967ffad2ecf33656ee4627f51f8a402c Mon Sep 17 00:00:00 2001 From: Alina Chen Date: Tue, 22 Oct 2024 16:15:55 -0400 Subject: [PATCH 07/14] updated syntax of workflow --- .github/workflows/azure-deploy-f24.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/azure-deploy-f24.yml b/.github/workflows/azure-deploy-f24.yml index 2b6705e717..3542592995 100644 --- a/.github/workflows/azure-deploy-f24.yml +++ b/.github/workflows/azure-deploy-f24.yml @@ -53,10 +53,15 @@ jobs: uses: actions/checkout@v4 with: repository: 'cmu-313/nodebb-frontend-f24-team-bulbasaur' + + - name: Theme directory location run: | pwd - + - name: Theme directory ls + run: | + ls + - name: Set up frontend theme run: | npm install nodebb-frontend-f24-team-bulbasaur From c5974c026bfe1c258ae97551a3fcaf9ca0c1f52e Mon Sep 17 00:00:00 2001 From: Alina Chen Date: Tue, 22 Oct 2024 16:27:14 -0400 Subject: [PATCH 08/14] update frontend installation in workflow --- .github/workflows/azure-deploy-f24.yml | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/.github/workflows/azure-deploy-f24.yml b/.github/workflows/azure-deploy-f24.yml index 3542592995..2f08c828f0 100644 --- a/.github/workflows/azure-deploy-f24.yml +++ b/.github/workflows/azure-deploy-f24.yml @@ -28,10 +28,6 @@ jobs: steps: - uses: actions/checkout@v4 - - name: Current team directory - run: | - pwd - - name: Set up Node.js version uses: actions/setup-node@v3 with: @@ -53,18 +49,10 @@ jobs: uses: actions/checkout@v4 with: repository: 'cmu-313/nodebb-frontend-f24-team-bulbasaur' - - - name: Theme directory location - run: | - pwd - - - name: Theme directory ls - run: | - ls - name: Set up frontend theme run: | - npm install nodebb-frontend-f24-team-bulbasaur + npm install cmu-313/nodebb-frontend-f24-team-bulbasaur - name: Rebuild NodeBB tpl run: | From 1475039902944ce947f37da95f336ed7d8a85883 Mon Sep 17 00:00:00 2001 From: Alina Chen Date: Tue, 22 Oct 2024 16:39:04 -0400 Subject: [PATCH 09/14] finding frontend repo workflow location --- .github/workflows/azure-deploy-f24.yml | 19 ++++++++++++++++++- .github/workflows/test.yaml | 12 +----------- 2 files changed, 19 insertions(+), 12 deletions(-) diff --git a/.github/workflows/azure-deploy-f24.yml b/.github/workflows/azure-deploy-f24.yml index 2f08c828f0..4a3766bfb2 100644 --- a/.github/workflows/azure-deploy-f24.yml +++ b/.github/workflows/azure-deploy-f24.yml @@ -49,10 +49,27 @@ jobs: uses: actions/checkout@v4 with: repository: 'cmu-313/nodebb-frontend-f24-team-bulbasaur' + + + - name: Cd 1 + run: | + cd .. + + - name: Ls 1 + run: | + ls + + - name: Cd 2 + run: | + cd .. + + - name: Ls 2 + run: | + ls - name: Set up frontend theme run: | - npm install cmu-313/nodebb-frontend-f24-team-bulbasaur + npm install ./cmu-313/nodebb-frontend-f24-team-bulbasaur - name: Rebuild NodeBB tpl run: | diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 0fdf32e499..c5158b7c54 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -76,14 +76,4 @@ jobs: run: | node app --setup="${SETUP}" --ci="${CI}" - - name: Run ESLint - run: npm run lint - - - name: Node tests - run: npm test - - - name: Extract coverage info - run: npm run coverage - - - name: Test coverage - uses: coverallsapp/github-action@v2 + From 8602aa06c650d8d222c6aad339d79c4913b149fd Mon Sep 17 00:00:00 2001 From: Alina Chen Date: Tue, 22 Oct 2024 16:52:56 -0400 Subject: [PATCH 10/14] update frontend repo checkout in workflow --- .github/workflows/azure-deploy-f24.yml | 20 ++------------------ 1 file changed, 2 insertions(+), 18 deletions(-) diff --git a/.github/workflows/azure-deploy-f24.yml b/.github/workflows/azure-deploy-f24.yml index 4a3766bfb2..84a4cc0204 100644 --- a/.github/workflows/azure-deploy-f24.yml +++ b/.github/workflows/azure-deploy-f24.yml @@ -49,27 +49,11 @@ jobs: uses: actions/checkout@v4 with: repository: 'cmu-313/nodebb-frontend-f24-team-bulbasaur' - - - - name: Cd 1 - run: | - cd .. - - - name: Ls 1 - run: | - ls - - - name: Cd 2 - run: | - cd .. - - - name: Ls 2 - run: | - ls + path: '/home/runner/work/nodebb-f24-team-bulbsaur/nodebb-f24-team-bulbsaur/nodebb-frontend-f24-team-bulbasaur' - name: Set up frontend theme run: | - npm install ./cmu-313/nodebb-frontend-f24-team-bulbasaur + npm install nodebb-frontend-f24-team-bulbasaur - name: Rebuild NodeBB tpl run: | From 7c58f0a7001ce2a9f5fb048d2063100e9fb62936 Mon Sep 17 00:00:00 2001 From: Alina Chen Date: Tue, 22 Oct 2024 16:58:55 -0400 Subject: [PATCH 11/14] created theme dir for workflow --- .github/workflows/azure-deploy-f24.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/azure-deploy-f24.yml b/.github/workflows/azure-deploy-f24.yml index 84a4cc0204..1c6dc76ef9 100644 --- a/.github/workflows/azure-deploy-f24.yml +++ b/.github/workflows/azure-deploy-f24.yml @@ -45,15 +45,19 @@ jobs: "redis:port": "6379", "redis:password": "${{ secrets.REDIS_PASSWORD }}" }' + - name: Create theme directory + run: | + mkdir theme + - name: Checkout theme repository uses: actions/checkout@v4 with: repository: 'cmu-313/nodebb-frontend-f24-team-bulbasaur' - path: '/home/runner/work/nodebb-f24-team-bulbsaur/nodebb-f24-team-bulbsaur/nodebb-frontend-f24-team-bulbasaur' + path: 'theme/nodebb-frontend-f24-team-bulbasaur' - name: Set up frontend theme run: | - npm install nodebb-frontend-f24-team-bulbasaur + npm install theme/nodebb-frontend-f24-team-bulbasaur - name: Rebuild NodeBB tpl run: | From c8a73d466a66f8383ce33ea6b48233b847664c98 Mon Sep 17 00:00:00 2001 From: Alina Chen Date: Tue, 22 Oct 2024 17:06:43 -0400 Subject: [PATCH 12/14] trying clone frontend repo in workflow --- .github/workflows/azure-deploy-f24.yml | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/.github/workflows/azure-deploy-f24.yml b/.github/workflows/azure-deploy-f24.yml index 1c6dc76ef9..30879d707b 100644 --- a/.github/workflows/azure-deploy-f24.yml +++ b/.github/workflows/azure-deploy-f24.yml @@ -45,19 +45,12 @@ jobs: "redis:port": "6379", "redis:password": "${{ secrets.REDIS_PASSWORD }}" }' - - name: Create theme directory - run: | - mkdir theme - - - name: Checkout theme repository - uses: actions/checkout@v4 - with: - repository: 'cmu-313/nodebb-frontend-f24-team-bulbasaur' - path: 'theme/nodebb-frontend-f24-team-bulbasaur' + - name: Clone theme repository + run: git clone https://github.com/CMU-313/nodebb-frontend-f24-team-bulbasaur.git - name: Set up frontend theme run: | - npm install theme/nodebb-frontend-f24-team-bulbasaur + npm install nodebb-frontend-f24-team-bulbasaur - name: Rebuild NodeBB tpl run: | From 1ea7a1234189d7404a4d041d4a2570e9dadf5328 Mon Sep 17 00:00:00 2001 From: Alina Chen Date: Tue, 22 Oct 2024 17:15:30 -0400 Subject: [PATCH 13/14] install frontend repo in workflow --- .github/workflows/azure-deploy-f24.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/azure-deploy-f24.yml b/.github/workflows/azure-deploy-f24.yml index 30879d707b..508857ae5d 100644 --- a/.github/workflows/azure-deploy-f24.yml +++ b/.github/workflows/azure-deploy-f24.yml @@ -44,13 +44,10 @@ jobs: "redis:host": "${{ secrets.REDIS_HOST }}", "redis:port": "6379", "redis:password": "${{ secrets.REDIS_PASSWORD }}" }' - - - name: Clone theme repository - run: git clone https://github.com/CMU-313/nodebb-frontend-f24-team-bulbasaur.git - name: Set up frontend theme run: | - npm install nodebb-frontend-f24-team-bulbasaur + npm install https://github.com/CMU-313/nodebb-frontend-f24-team-bulbasaur.git - name: Rebuild NodeBB tpl run: | From 2a983277e651e5c0655df4e2e209197342b8c38b Mon Sep 17 00:00:00 2001 From: Michaelli8899 <147345359+Michaelli8899@users.noreply.github.com> Date: Tue, 22 Oct 2024 18:18:40 -0400 Subject: [PATCH 14/14] Add back lint and coverage tests --- .github/workflows/azure-deploy-f24.yml | 7 ++----- .github/workflows/test.yaml | 12 ++++++++++++ 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/.github/workflows/azure-deploy-f24.yml b/.github/workflows/azure-deploy-f24.yml index 508857ae5d..b9907c675e 100644 --- a/.github/workflows/azure-deploy-f24.yml +++ b/.github/workflows/azure-deploy-f24.yml @@ -7,7 +7,6 @@ on: push: branches: - f24 - - frontend-deployment workflow_dispatch: concurrency: @@ -46,12 +45,10 @@ jobs: "redis:password": "${{ secrets.REDIS_PASSWORD }}" }' - name: Set up frontend theme - run: | - npm install https://github.com/CMU-313/nodebb-frontend-f24-team-bulbasaur.git + run: npm install https://github.com/CMU-313/nodebb-frontend-f24-team-bulbasaur.git - name: Rebuild NodeBB tpl - run: | - ./nodebb build tpl + run: ./nodebb build tpl - name: 'Deploy to Azure Web App' id: deploy-to-webapp diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index c5158b7c54..63c0519e22 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -75,5 +75,17 @@ jobs: } run: | node app --setup="${SETUP}" --ci="${CI}" + + - name: Run ESLint + run: npm run lint + + - name: Node tests + run: npm test + + - name: Extract coverage info + run: npm run coverage + + - name: Test coverage + uses: coverallsapp/github-action@v2