Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow ignoring animations #441

Merged
merged 4 commits into from
Dec 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions .github/workflows/test-report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: 'Test Report'
on:
workflow_run:
workflows: ['Test']
types:
- completed
permissions:
contents: read
actions: read
checks: write
jobs:
test-report:
runs-on: ubuntu-latest
steps:
- uses: dorny/test-reporter@v1
with:
artifact: test-results # artifact name
name: Tests results # Name of the check run which will be created
path: '*.xml' # Path to test results (inside artifact .zip)
reporter: jest-junit # Format of test results
57 changes: 48 additions & 9 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,32 +1,71 @@
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs

name: Test and Lint
name: Test

on:
push:
branches: ["master"]
paths:
- .github/workflows/test.yml
- package.json
- pnpm-lock.yaml
- src/**
- tests/**
pull_request:
branches: ["master"]
paths:
- .github/workflows/test.yml
- package.json
- pnpm-lock.yaml
- src/**
- tests/**
merge_group:
types: [checks_requested]

jobs:
build:
test:
runs-on: ubuntu-latest

strategy:
matrix:
script: ['lint', 'typecheck', 'test']
steps:
- uses: actions/checkout@v4

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

- uses: pnpm/action-setup@v4
with:
version: 8
version: 9
- run: pnpm install

- name: lining
run: pnpm run lint
- name: linting
run: pnpm run ${{ matrix.script }} ${{ matrix.script == 'test' && '--coverage.reporter=clover --coverage.reporter=text --coverage.reporter=text-summary --reporter=junit' || ''}}

- uses: actions/upload-artifact@v4 # upload test results
if: matrix.script == 'test' && (success() || failure()) # run this step even if previous step failed
with:
name: test-results
path: junit-report.xml

- if: matrix.script == 'test'
uses: actions/upload-artifact@v4 # upload coverage
with:
name: coverage-report
path: coverage/clover.xml

- name: test
run: pnpm run test
coverage-report:
needs: [test]
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v4
with:
name: coverage-report

- name: Code Coverage Annotation
uses: tofandel/codecoverage@a1c2e343a2cfaf034ce2bf25a4cd939ea1f4c9ca
with:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
COVERAGE_FILE_PATH: "./clover.xml"
COVERAGE_FORMAT: "clover"
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,4 @@ yarn-error.log*
*cache

package-lock.json
coverage/*
3 changes: 2 additions & 1 deletion eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ export default tseslint.config(
},
},
rules: {
'no-console': 'error',
'@typescript-eslint/no-unused-vars': 'error',
'@typescript-eslint/no-empty-function': 'off',
'@typescript-eslint/no-non-null-assertion': 'off',
Expand All @@ -45,6 +46,6 @@ export default tseslint.config(
},
},
{
ignores: ['**/.vitepress/*', 'dist', 'node_modules'],
ignores: ['**/.vitepress/*', 'dist', 'node_modules', 'coverage'],
}
)
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"prettier:fix": "$npm_execpath run prettier --write",
"typecheck": "tsc -p .",
"typecheck:watch": "tsc -p . --watch --preserveWatchOutput",
"test": "vitest run",
"test": "vitest run --coverage",
"test:update": "vitest run --u",
"test:watch": "vitest watch",
"prepare": "husky"
Expand Down Expand Up @@ -62,6 +62,7 @@
"@typescript-eslint/eslint-plugin": "^8.16.0",
"@typescript-eslint/parser": "^8.16.0",
"@vitejs/plugin-vue": "^5.2.1",
"@vitest/coverage-v8": "^2.1.8",
"@vue/test-utils": "^2.4.6",
"eslint": "^9.16.0",
"eslint-config-prettier": "^9.1.0",
Expand All @@ -79,11 +80,12 @@
"rollup-plugin-delete": "^2.1.0",
"rollup-plugin-dts": "^6.1.1",
"rollup-plugin-typescript-paths": "^1.5.0",
"tslib": "^2.8.1",
"typescript": "^5.7.2",
"typescript-eslint": "^8.16.0",
"vite": "^6",
"vitepress": "^1.5.0",
"vitest": "^2.1.6",
"vitest": "^2.1.8",
"vue": "^3.2.0"
},
"peerDependencies": {
Expand Down
Loading
Loading