Skip to content

Commit

Permalink
Adds weekly scheduled smoke tests (#923)
Browse files Browse the repository at this point in the history
  • Loading branch information
AriPerkkio committed Dec 12, 2020
1 parent c137daa commit bf941a1
Show file tree
Hide file tree
Showing 5 changed files with 1,912 additions and 2 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/smoke-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Smoke test

on:
schedule:
- cron: '0 0 * * SUN'
workflow_dispatch:

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 14
- run: npm install
- run: npm link
- run: npm link eslint-plugin-unicorn
- run: npm run smoke
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,5 @@ yarn.lock
coverage
package-lock.json
/test/integration/fixtures
.cache-eslint-remote-tester
eslint-remote-tester-results
8 changes: 6 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
"test": "xo && nyc ava",
"create-rule": "node ./scripts/create-rule.js",
"lint": "node ./test/lint/lint.js",
"integration": "node ./test/integration/test.js"
"integration": "node ./test/integration/test.js",
"smoke": "eslint-remote-tester --config ./test/smoke/eslint-remote-tester.config.js"
},
"files": [
"index.js",
Expand Down Expand Up @@ -60,6 +61,7 @@
"eslint": "^7.15.0",
"eslint-ava-rule-tester": "^4.0.0",
"eslint-plugin-eslint-plugin": "^2.3.0",
"eslint-remote-tester": "^0.3.5",
"execa": "^5.0.0",
"listr": "^0.14.3",
"mem": "8.0.0",
Expand Down Expand Up @@ -96,7 +98,9 @@
"plugin:eslint-plugin/all"
],
"ignores": [
"test/integration/{fixtures,unicorn}/**"
"test/integration/{fixtures,unicorn}/**",
".cache-eslint-remote-tester",
"eslint-remote-tester-results"
],
"overrides": [
{
Expand Down
54 changes: 54 additions & 0 deletions test/smoke/eslint-remote-tester.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
'use strict';

module.exports = {
/** Repositories to scan */
repositories: require('./repositories.json'),

/** Extensions of files under scanning */
extensions: ['js', 'jsx', 'ts', 'tsx'],

/** Optional pattern used to exclude paths */
pathIgnorePattern: `(${[
'node_modules',
'\\/\\.', // Any file or directory starting with dot, e.g. '.git'
'/dist/',
'/build/',
// Common patterns for minified JS
'babel\\.js',
'vendor\\.js',
'vendors\\.js',
'chunk\\.js',
'bundle\\.js',
'react-dom\\.development\\.js',
'\\.min\\.js' // Any *.min.js
].join('|')})`,

/** Empty array since we are only interested in linter crashes */
rulesUnderTesting: [],

/** Maximum amount of tasks ran concurrently */
concurrentTasks: 3,

/** Optional boolean flag used to enable caching of cloned repositories. For CIs it's ideal to disable caching. Defauls to true. */
cache: false,

/** Optional setting for log level. Valid values are verbose, info, warn, error. Defaults to verbose. */
logLevel: 'info',

/** ESLint configuration */
eslintrc: {
root: true,
env: {
es6: true
},
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 2020,
sourceType: 'module',
ecmaFeatures: {
jsx: true
}
},
extends: ['plugin:unicorn/recommended']
}
};

0 comments on commit bf941a1

Please sign in to comment.