Skip to content

Commit 3e2a4e2

Browse files
authored
Smoke tests: add eslint-remote-tester-repositories (#1518)
1 parent 7ed1a0f commit 3e2a4e2

File tree

4 files changed

+20
-1868
lines changed

4 files changed

+20
-1868
lines changed

.github/workflows/smoke-test.yml

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,22 @@ name: Smoke test
22

33
on:
44
schedule:
5-
- cron: '0 0 * * SUN'
5+
- cron: "0 0 * * SUN"
66
workflow_dispatch:
77

88
jobs:
99
lint:
1010
runs-on: ubuntu-latest
1111
steps:
12-
- uses: actions/checkout@v2
13-
- uses: actions/setup-node@v1
14-
with:
15-
node-version: 14
16-
- run: |
17-
npm install
18-
npm link
19-
npm link eslint-plugin-unicorn
20-
- uses: AriPerkkio/eslint-remote-tester-run-action@v1
21-
with:
22-
github-token: ${{ secrets.GITHUB_TOKEN }}
23-
issue-title: "Results of weekly scheduled smoke test"
24-
eslint-remote-tester-config: test/smoke/eslint-remote-tester.config.js
12+
- uses: actions/checkout@v2
13+
- uses: actions/setup-node@v1
14+
with:
15+
node-version: 14
16+
- run: |
17+
npm install
18+
npm link
19+
npm link eslint-plugin-unicorn
20+
- uses: AriPerkkio/eslint-remote-tester-run-action@v1
21+
with:
22+
issue-title: "Results of weekly scheduled smoke test"
23+
eslint-remote-tester-config: test/smoke/eslint-remote-tester.config.js

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@
6464
"eslint-ava-rule-tester": "^4.0.0",
6565
"eslint-plugin-eslint-plugin": "^3.5.3",
6666
"eslint-remote-tester": "^1.3.0",
67+
"eslint-remote-tester-repositories": "^0.0.3",
6768
"execa": "^5.1.1",
6869
"listr": "^0.14.3",
6970
"lodash-es": "4.17.21",

test/smoke/eslint-remote-tester.config.js

Lines changed: 6 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,17 @@
11
'use strict';
22

3+
const {getRepositories, getPathIgnorePattern} = require('eslint-remote-tester-repositories');
4+
35
module.exports = {
46
/** Repositories to scan */
5-
repositories: require('./repositories.json'),
7+
repositories: getRepositories({randomize: true}),
8+
9+
/** Optional pattern used to exclude paths */
10+
pathIgnorePattern: getPathIgnorePattern(),
611

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

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-
2915
/** Maximum amount of tasks ran concurrently */
3016
concurrentTasks: 3,
3117

0 commit comments

Comments
 (0)