Skip to content

add playwright test (#8) #34

add playwright test (#8)

add playwright test (#8) #34

Workflow file for this run

name: ci
on:
push:
branches:
- master
pull_request:
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: sudo apt install -y clang-format
- name: Lint
run: |
find include preview src -name '*.mm' -o -name '*.hpp' | xargs clang-format -Werror --dry-run
build:
needs: lint
runs-on: macos-13
strategy:
fail-fast: false
matrix:
arch: [x86_64, arm64]
steps:
- uses: actions/checkout@v4
with:
submodules: true
- uses: actions/setup-node@v4
with:
node-version: 20.x
- name: Install node dependencies
run: |
npm i -g pnpm
pnpm i
- name: Lint and Check type
if: ${{ matrix.arch == 'x86_64' }}
run: |
pnpm run lint
pnpm run check
- name: Install dependencies
run: |
brew install ninja
./install-deps.sh ${{ matrix.arch }}
- name: Build
run: |
PKG_CONFIG_PATH=/tmp/fcitx5/lib/pkgconfig cmake -B build -G Ninja \
-DCMAKE_OSX_ARCHITECTURES=${{ matrix.arch }} \
-DCMAKE_BUILD_TYPE=Release
cmake --build build
- name: Test
if: ${{ matrix.arch == 'x86_64' }}
run: |
npx playwright install webkit
pnpm run test
- name: Setup tmate session
if: ${{ failure() }}
uses: mxschmitt/action-tmate@v3