Skip to content

Commit bf941a1

Browse files
authored
Adds weekly scheduled smoke tests (#923)
1 parent c137daa commit bf941a1

File tree

5 files changed

+1912
-2
lines changed

5 files changed

+1912
-2
lines changed

.github/workflows/smoke-test.yml

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: Smoke test
2+
3+
on:
4+
schedule:
5+
- cron: '0 0 * * SUN'
6+
workflow_dispatch:
7+
8+
jobs:
9+
lint:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v2
13+
- uses: actions/setup-node@v1
14+
with:
15+
node-version: 14
16+
- run: npm install
17+
- run: npm link
18+
- run: npm link eslint-plugin-unicorn
19+
- run: npm run smoke

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,5 @@ yarn.lock
44
coverage
55
package-lock.json
66
/test/integration/fixtures
7+
.cache-eslint-remote-tester
8+
eslint-remote-tester-results

package.json

+6-2
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@
1717
"test": "xo && nyc ava",
1818
"create-rule": "node ./scripts/create-rule.js",
1919
"lint": "node ./test/lint/lint.js",
20-
"integration": "node ./test/integration/test.js"
20+
"integration": "node ./test/integration/test.js",
21+
"smoke": "eslint-remote-tester --config ./test/smoke/eslint-remote-tester.config.js"
2122
},
2223
"files": [
2324
"index.js",
@@ -60,6 +61,7 @@
6061
"eslint": "^7.15.0",
6162
"eslint-ava-rule-tester": "^4.0.0",
6263
"eslint-plugin-eslint-plugin": "^2.3.0",
64+
"eslint-remote-tester": "^0.3.5",
6365
"execa": "^5.0.0",
6466
"listr": "^0.14.3",
6567
"mem": "8.0.0",
@@ -96,7 +98,9 @@
9698
"plugin:eslint-plugin/all"
9799
],
98100
"ignores": [
99-
"test/integration/{fixtures,unicorn}/**"
101+
"test/integration/{fixtures,unicorn}/**",
102+
".cache-eslint-remote-tester",
103+
"eslint-remote-tester-results"
100104
],
101105
"overrides": [
102106
{
+54
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
'use strict';
2+
3+
module.exports = {
4+
/** Repositories to scan */
5+
repositories: require('./repositories.json'),
6+
7+
/** Extensions of files under scanning */
8+
extensions: ['js', 'jsx', 'ts', 'tsx'],
9+
10+
/** Optional pattern used to exclude paths */
11+
pathIgnorePattern: `(${[
12+
'node_modules',
13+
'\\/\\.', // Any file or directory starting with dot, e.g. '.git'
14+
'/dist/',
15+
'/build/',
16+
// Common patterns for minified JS
17+
'babel\\.js',
18+
'vendor\\.js',
19+
'vendors\\.js',
20+
'chunk\\.js',
21+
'bundle\\.js',
22+
'react-dom\\.development\\.js',
23+
'\\.min\\.js' // Any *.min.js
24+
].join('|')})`,
25+
26+
/** Empty array since we are only interested in linter crashes */
27+
rulesUnderTesting: [],
28+
29+
/** Maximum amount of tasks ran concurrently */
30+
concurrentTasks: 3,
31+
32+
/** Optional boolean flag used to enable caching of cloned repositories. For CIs it's ideal to disable caching. Defauls to true. */
33+
cache: false,
34+
35+
/** Optional setting for log level. Valid values are verbose, info, warn, error. Defaults to verbose. */
36+
logLevel: 'info',
37+
38+
/** ESLint configuration */
39+
eslintrc: {
40+
root: true,
41+
env: {
42+
es6: true
43+
},
44+
parser: '@typescript-eslint/parser',
45+
parserOptions: {
46+
ecmaVersion: 2020,
47+
sourceType: 'module',
48+
ecmaFeatures: {
49+
jsx: true
50+
}
51+
},
52+
extends: ['plugin:unicorn/recommended']
53+
}
54+
};

0 commit comments

Comments
 (0)