Skip to content

Commit

Permalink
fix coverage, update to node 20
Browse files Browse the repository at this point in the history
  • Loading branch information
xvaara committed Jan 25, 2024
1 parent b825e95 commit 5091e5b
Show file tree
Hide file tree
Showing 4 changed files with 58 additions and 94 deletions.
41 changes: 15 additions & 26 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

permissions:
pull-requests: write
contents: read

on:
push:
branches:
Expand All @@ -23,42 +27,27 @@ jobs:
os: [ubuntu-latest]

steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0

- uses: pnpm/[email protected]
- uses: actions/checkout@v4

- run: corepack enable
- uses: actions/setup-node@v3
with:
node-version: 18.x

- name: Get pnpm store directory
id: pnpm-cache
run: |
echo "pnpm_cache_dir=$(pnpm store path)" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }}
key: ${{ runner.os }}-pnpm-store-main-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-main-
node-version: '20'
cache: pnpm

- name: 📦 Install deps (with cache)
run: pnpm install --child-concurrency 3
- name: 📦 Install dependencies
run: pnpm install --frozen-lockfile

- name: 👀 Lint
run: pnpm lint

- name: 🚀 Build
run: pnpm build

- name: 🧪 Test
run: pnpm test
env:
VITE_TEST_DB_URL: ${{ secrets.VITE_TEST_DB_URL }}
# - name: 🧪 Test
# run: pnpm test
# env:
# VITE_TEST_DB_URL: ${{ secrets.VITE_TEST_DB_URL }}

- name: 🧪 Test with coverage
run: pnpm coverage
Expand All @@ -67,4 +56,4 @@ jobs:

- name: 📝 Upload coverage
if: always()
uses: davelosert/vitest-coverage-report-action@v1
uses: davelosert/vitest-coverage-report-action@v2
8 changes: 6 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,21 @@ on:
tags:
- 'v*'

permissions:
pull-requests: write
contents: write

jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0

- uses: actions/setup-node@v3
with:
node-version: 16.x
node-version: 20.x

- run: npx changelogithub
env:
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
"devDependencies": {
"@antfu/eslint-config": "^2.6.3",
"@vitejs/plugin-vue": "^5.0.3",
"@vitest/coverage-c8": "^0.33.0",
"@vitest/coverage-v8": "^1.2.1",
"@vue/test-utils": "^2.4.3",
"@vueuse/core": "^10.7.2",
"bumpp": "^9.3.0",
Expand Down
101 changes: 36 additions & 65 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 5091e5b

Please sign in to comment.