ci: setup playwright #445
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build, Test, and Deploy | |
on: [pull_request] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set Node Version | |
uses: actions/setup-node@v4 | |
with: | |
node-version: lts/iron | |
- name: Clone Snapshot Repository | |
run: | | |
git clone https://[email protected]/chintankavathia/ngx-datatable-snapshots.git temp_snapshots | |
env: | |
SNAPSHOT_REPO_TOKEN: ${{ secrets.SNAPSHOT_REPO_TOKEN }} | |
- name: Copy Snapshots to Playwright Folder | |
run: | | |
mkdir -p playwright/snapshots | |
cp -r temp_snapshots/snapshots/e2e playwright/snapshots/ | |
rm -rf temp_snapshots | |
- name: Install | |
uses: bahmutov/npm-install@v1 | |
- name: Build and package library | |
run: | | |
npm run package --if-present | |
env: | |
CI: true | |
- name: Format | |
run: | | |
npm run format:check --if-present | |
env: | |
CI: true | |
- name: Build | |
run: | | |
npm run build --if-present | |
env: | |
CI: true | |
- name: Test | |
run: | | |
npm run ci --if-present | |
env: | |
CI: true | |
- name: E2E Prepare | |
run: | | |
npm run e2e:prepare --if-present | |
env: | |
CI: true | |
- name: E2E | |
run: | | |
npm run vrt --if-present | |
env: | |
CI: true | |
- name: Build Docs | |
run: | | |
npm run build-docs --if-present | |
env: | |
CI: true | |
- name: Deploy Docs | |
uses: JamesIves/[email protected] | |
with: | |
branch: gh-pages | |
folder: dist/ngx-datatable | |
if: ${{ github.ref == 'refs/heads/master' }} |