Skip to content

test: enhance jest-puppeteer type #214

test: enhance jest-puppeteer type

test: enhance jest-puppeteer type #214

Workflow file for this run

name: CI
on:
pull_request:
branches:
- master
types:
- opened
- edited
- synchronize
permissions:
contents: read
pull-requests: write
issues: write
checks: write
jobs:
ci:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
ref: ${{ github.base_ref }}
fetch-depth: 0
- name: Git pull
run: |
git config --local user.email "[email protected]"
git config --local user.name "Github Actions"
git merge origin/${{ github.head_ref }} --allow-unrelated-histories
- name: Set up NodeJS
uses: actions/setup-node@v3
with:
node-version: 18
cache: yarn
- name: Install packages
run: yarn install --frozen-lockfile
- name: Lint PR
uses: amannn/action-semantic-pull-request@v5
env:
GITHUB_TOKEN: ${{ github.token }}
- name: Check format
run: yarn format
- name: Check lint
run: yarn lint
continue-on-error: true
- name: Annotate linting results
uses: ataylorme/eslint-annotate-action@v2
with:
repo-token: "${{ github.token }}"
report-json: "eslint_report.json"
markdown-report-on-step-summary: true
check-name: "eslint-report"
- name: Create env file
run: |
echo "VITE_CONSENT_CLIENT_ID=${{ secrets.CONSENT_CLIENT_ID }}" >> .env.production
echo "VITE_REFRESH_CLIENT_ID=${{ secrets.REFRESH_CLIENT_ID }}" >> .env.production
- name: Build
run: yarn build
- name: Install xvfb
run: |
sudo apt update
sudo apt install -yq libgconf-2-4
sudo apt install -y wget xvfb --no-install-recommends
- name: Test
run: xvfb-run --auto-servernum --server-args="-screen 0 1280x1024x24" -- yarn test
env:
DISPLAY: :99
GOOGLE_MAIL: ${{ secrets.GOOGLE_MAIL }}
GOOGLE_PASSWORD: ${{ secrets.GOOGLE_PASSWORD }}
GOOGLE_CLIENT_ID: ${{ secrets.GOOGLE_CLIENT_ID }}
GOOGLE_CLIENT_SECRET: ${{ secrets.GOOGLE_CLIENT_SECRET }}