Skip to content

Commit

Permalink
ci: update github action
Browse files Browse the repository at this point in the history
  • Loading branch information
asmyshlyaev177 committed Jun 29, 2024
1 parent a805f7e commit 5311d96
Show file tree
Hide file tree
Showing 4 changed files with 161 additions and 29 deletions.
27 changes: 0 additions & 27 deletions .github/workflows/playwright.yml

This file was deleted.

43 changes: 43 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Playwright Tests
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
test:
timeout-minutes: 60
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: 'npm'
cache-dependency-path: 'package-lock.json'
- name: Install dependencies
run: npm ci
- name: Unit tests
run: npm run test:unit
- name: setup Playwright
run: |
[ -d /root/.cache/. ] || sudo mkdir /root/.cache && \
[ -d /root/.cache//ms-playwright/. ] || sudo mkdir /root/.cache/ms-playwright && \
sudo chmod -R 777 /root/.cache/ms-playwright && \
npx cross-env HOME=/root PLAYWRIGHT_BROWSERS_PATH=0 npx playwright install chromium firefox webkit --with-deps
- name: Run Playwright tests
run: |
# npm run dev & \
# npx wait-on http://localhost:3000 && \
npx cross-env HOME=/root PLAYWRIGHT_BROWSERS_PATH=0 npm run test:int
- uses: actions/upload-artifact@v3
if: always()
with:
name: playwright-report
path: playwright-report/
retention-days: 10
119 changes: 117 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@
"ts-jest": "^29.1.5",
"ts-node": "^10.9.2",
"typescript": "^5.3.3",
"wait-on": "^7.2.0",
"wireit": "^0.14.4"
}
}

0 comments on commit 5311d96

Please sign in to comment.