Skip to content

Commit

Permalink
Merge branch 'app/ci/actions' into development
Browse files Browse the repository at this point in the history
  • Loading branch information
william-monroy committed Dec 1, 2023
2 parents 85ea477 + c7f1378 commit 835a20e
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 37 deletions.
20 changes: 2 additions & 18 deletions .github/workflows/cicd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,6 @@ jobs:
run: |
ls
# - name: Test
# run: |
# pnpm test:ci --if-present

Release:
name: Release
needs: [Build, DeployStagingWeb, DeployStagingDocs]
Expand Down Expand Up @@ -79,10 +75,6 @@ jobs:
run: |
cat apps/web/.env
# - name: Test
# run: |
# pnpm test --if-present

DeployStagingWeb:
name: Deploy to Staging Web
permissions:
Expand Down Expand Up @@ -124,10 +116,6 @@ jobs:
run: |
cd apps/web && pnpm build
# - name: Stop server
# run: |
# sshpass -p "${{ secrets.LIGHTSAIL_SSH_PASS }}" ssh -o StrictHostKeyChecking=no [email protected] "cd apps/web && pm2 stop all"

- name: Clean LightSail directory
run: |
sshpass -p "${{ secrets.LIGHTSAIL_SSH_PASS }}" ssh -o StrictHostKeyChecking=no [email protected] "rm -rf apps/web"
Expand All @@ -151,7 +139,7 @@ jobs:
- name: Start server
run: |
sshpass -p "${{ secrets.LIGHTSAIL_SSH_PASS }}" ssh -o StrictHostKeyChecking=no [email protected] "cd apps/web && pm2 start pnpm --name "web" -- start"
sshpass -p "${{ secrets.LIGHTSAIL_SSH_PASS }}" ssh -o StrictHostKeyChecking=no [email protected] "cd apps/web && pm2 stop web && pm2 delete web && pm2 start pnpm --name "web" -- start"
- name: Remove web node_modules
run: |
Expand Down Expand Up @@ -197,10 +185,6 @@ jobs:
run: |
cd apps/docs && pnpm build
# - name: Stop server
# run: |
# sshpass -p "${{ secrets.LIGHTSAIL_SSH_PASS }}" ssh -o StrictHostKeyChecking=no [email protected] "cd apps/docs && pm2 stop all"

- name: Clean LightSail directory
run: |
sshpass -p "${{ secrets.LIGHTSAIL_SSH_PASS }}" ssh -o StrictHostKeyChecking=no [email protected] "rm -rf apps/docs"
Expand All @@ -220,7 +204,7 @@ jobs:
- name: Start server
run: |
sshpass -p "${{ secrets.LIGHTSAIL_SSH_PASS }}" ssh -o StrictHostKeyChecking=no [email protected] "cd apps/docs && pm2 start pnpm --name "docs" -- start -- -p 3001"
sshpass -p "${{ secrets.LIGHTSAIL_SSH_PASS }}" ssh -o StrictHostKeyChecking=no [email protected] "cd apps/docs && pm2 stop docs && pm2 delete docs && pm2 start pnpm --name "docs" -- start -- -p 3001"
- name: Remove docs node_modules
run: |
Expand Down
38 changes: 19 additions & 19 deletions .github/workflows/playwright.yml
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
name: Playwright Tests
on:
push:
branches: [ main, master ]
branches: [main]
pull_request:
branches: [ main, master ]
branches: [main]
jobs:
test:
TestE2E:
timeout-minutes: 60
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
- name: Install dependencies
run: npm install -g pnpm && pnpm install
- name: Install Playwright Browsers
run: pnpm exec playwright install --with-deps
- name: Run Playwright tests
run: pnpm exec playwright test
- uses: actions/upload-artifact@v3
if: always()
with:
name: playwright-report
path: playwright-report/
retention-days: 30
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
- name: Install dependencies
run: npm install -g pnpm && pnpm install
- name: Install Playwright Browsers
run: pnpm exec playwright install --with-deps
- name: Run Playwright tests
run: pnpm exec playwright test
- uses: actions/upload-artifact@v3
if: always()
with:
name: playwright-report
path: playwright-report/
retention-days: 30

0 comments on commit 835a20e

Please sign in to comment.