Skip to content

Commit

Permalink
Merge pull request #2632 from nextcloud/fix/type-quting
Browse files Browse the repository at this point in the history
  • Loading branch information
skjnldsv authored Mar 15, 2022
2 parents 67a9da3 + b34df2d commit 6d171ad
Show file tree
Hide file tree
Showing 12 changed files with 21,216 additions and 13,300 deletions.
47 changes: 47 additions & 0 deletions .github/workflows/node-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# This workflow is provided via the organization template repository
#
# https://github.com/nextcloud/.github
# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization

name: Node

on:
pull_request:
push:
branches:
- main
- master
- stable*

jobs:
test:
runs-on: ubuntu-latest

name: test
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Read package.json node and npm engines version
uses: skjnldsv/[email protected]
id: versions
with:
fallbackNode: '^12'
fallbackNpm: '^6'

- name: Set up node ${{ steps.versions.outputs.nodeVersion }}
uses: actions/setup-node@v3
with:
node-version: ${{ steps.versions.outputs.nodeVersion }}

- name: Set up npm ${{ steps.versions.outputs.npmVersion }}
run: npm i -g npm@"${{ steps.versions.outputs.npmVersion }}"

- name: Install dependencies
run: npm ci

- name: Testing
run: npm run test:coverage --if-present

- name: Upload coverage
uses: codecov/codecov-action@v2
20 changes: 20 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
const esModules = ['p-limit', 'yocto-queue'].join('|')

module.exports = {
preset: 'ts-jest',
moduleFileExtensions: ['js', 'vue', 'ts'],
collectCoverageFrom: [
'src/**/*.{js,vue}',
'!**/node_modules/**',
],
setupFilesAfterEnv: [
'<rootDir>/tests/setup.js',
],
testEnvironment: 'jsdom',
transform: {
'^.+\\.ts$': 'ts-jest',
'^.+\\.js$': 'babel-jest',
'^.+\\.vue$': '@vue/vue2-jest',
},
transformIgnorePatterns: [`/node_modules/(?!${esModules})`],
}
Loading

0 comments on commit 6d171ad

Please sign in to comment.