From 408aff20ee530b294826ece4fb64748d2b5adde9 Mon Sep 17 00:00:00 2001 From: Daniel Roe Date: Sun, 4 Dec 2022 23:28:04 +0000 Subject: [PATCH] ci: test project on pull requests (#338) --- .github/workflows/ci.yml | 33 ++++++++++++++++++++++++++++ components/nav/NavBottomMoreMenu.vue | 4 +++- tests/html-parse.test.ts | 2 +- 3 files changed, 37 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 00000000..ec5a3f58 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,33 @@ +name: ci + +on: + push: + branches: + - main + pull_request: + branches: + - main + +jobs: + ci: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + - run: corepack enable + - uses: actions/setup-node@v3 + with: + node-version: 16 + cache: pnpm + + - name: ๐Ÿ“ฆ Install dependencies + run: pnpm install --frozen-lockfile + + - name: ๐Ÿšง Set up project + run: pnpm nuxi prepare + + - name: ๐Ÿงช Test project + run: pnpm test + + - name: ๐Ÿ’ช Type check + run: pnpm test:typecheck diff --git a/components/nav/NavBottomMoreMenu.vue b/components/nav/NavBottomMoreMenu.vue index ed07491d..efa0aebe 100644 --- a/components/nav/NavBottomMoreMenu.vue +++ b/components/nav/NavBottomMoreMenu.vue @@ -44,6 +44,8 @@ onBeforeUnmount(() => { if (!import.meta.env.SSR) document.removeEventListener('click', clickEvent) }) +// work around a type error when persisted is passed directly: An object literal cannot have multiple properties with the same name. +const persisted = 'persisted' as string