feat: update webclip solution to use chrome tab screenshot #10
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: Main CI | |
on: | |
push: | |
branches: ['main'] | |
pull_request: | |
branches: ['main'] | |
jobs: | |
cypress-run: | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Use Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '20.x' | |
- name: Cache node modules | |
uses: actions/cache@v3 | |
env: | |
cache-name: cache-node-modules | |
with: | |
path: ~/.npm | |
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-build-${{ env.cache-name }}- | |
${{ runner.os }}-build- | |
${{ runner.os }}- | |
- name: Install dependencies | |
run: npm ci | |
- name: build | |
run: npm run build:e2e | |
- name: Copy env file | |
run: cp .env.example .env | |
- name: e2e test | |
run: npm run e2e | |
cypress-run-windows: | |
runs-on: windows-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Use Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '20.x' | |
- name: Get npm cache directory | |
id: npm-cache-dir | |
shell: bash | |
run: echo "dir=$(npm config get cache)" >> $GITHUB_OUTPUT | |
- name: Cache node modules | |
uses: actions/cache@v3 | |
env: | |
cache-name: cache-node-modules | |
with: | |
path: ${{ steps.npm-cache-dir.outputs.dir }} | |
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-build-${{ env.cache-name }}- | |
${{ runner.os }}-build- | |
${{ runner.os }}- | |
- name: Install dependencies | |
run: npm ci | |
- name: build | |
run: npm run build:e2e | |
- name: Copy env file | |
run: copy .env.example .env | |
- name: e2e test | |
run: npm run e2e |