mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
4d42c9ea68
* feat: support document apply remote events * fix: add tests for database * fix: add test for filter,sort and group * fix: jest ci * fix: jest ci * fix: jest ci * fix: jest ci * fix: cypress test
60 lines
1.7 KiB
YAML
60 lines
1.7 KiB
YAML
name: Web Code Coverage
|
|
|
|
on:
|
|
pull_request:
|
|
paths:
|
|
- ".github/workflows/web2_ci.yaml"
|
|
- "frontend/appflowy_web_app/**"
|
|
- "frontend/resources/**"
|
|
env:
|
|
NODE_VERSION: "18.16.0"
|
|
PNPM_VERSION: "8.5.0"
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
|
cancel-in-progress: true
|
|
jobs:
|
|
test:
|
|
if: github.event.pull_request.draft != true
|
|
runs-on: ubuntu-22.04
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Maximize build space (ubuntu only)
|
|
run: |
|
|
sudo rm -rf /usr/share/dotnet
|
|
sudo rm -rf /opt/ghc
|
|
sudo rm -rf "/usr/local/share/boost"
|
|
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
|
|
sudo docker image prune --all --force
|
|
sudo rm -rf /opt/hostedtoolcache/codeQL
|
|
sudo rm -rf ${GITHUB_WORKSPACE}/.git
|
|
sudo rm -rf $ANDROID_HOME/ndk
|
|
- name: setup node
|
|
uses: actions/setup-node@v3
|
|
with:
|
|
node-version: ${{ env.NODE_VERSION }}
|
|
- name: setup pnpm
|
|
uses: pnpm/action-setup@v2
|
|
with:
|
|
version: ${{ env.PNPM_VERSION }}
|
|
# Install pnpm dependencies, cache them correctly
|
|
# and run all Cypress tests
|
|
- name: Cypress run
|
|
uses: cypress-io/github-action@v6
|
|
with:
|
|
working-directory: frontend/appflowy_web_app
|
|
component: true
|
|
build: pnpm run build
|
|
start: pnpm run start
|
|
browser: chrome
|
|
|
|
- name: Jest run
|
|
working-directory: frontend/appflowy_web_app
|
|
run: |
|
|
pnpm run test:unit
|
|
|
|
- name: Generate and post coverage summary
|
|
working-directory: frontend/appflowy_web_app
|
|
run: |
|
|
pnpm run merge-coverage
|
|
|