Skip to content

Commit 238cf8a

Browse files
committed
[Tests]: add weekly scheduled smoke tests
1 parent 40de474 commit 238cf8a

File tree

4 files changed

+74
-0
lines changed

4 files changed

+74
-0
lines changed

.github/workflows/smoke-test.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Smoke test
2+
3+
on:
4+
schedule:
5+
- cron: '0 0 * * SUN'
6+
workflow_dispatch:
7+
8+
jobs:
9+
lint:
10+
if: ${{ github.repository == 'yannickcr/eslint-plugin-react' }}
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v2
14+
- uses: actions/setup-node@v1
15+
with:
16+
node-version: 14
17+
- uses: ljharb/actions/node/install@main
18+
name: 'nvm install lts/* && npm install'
19+
with:
20+
node-version: 'lts/*'
21+
skip-ls-check: true
22+
- run: |
23+
npm link
24+
npm link eslint-plugin-react
25+
- uses: AriPerkkio/eslint-remote-tester-run-action@v1
26+
with:
27+
issue-title: "Results of weekly scheduled smoke test"
28+
eslint-remote-tester-config: test/eslint-remote-tester.config.js

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ node_modules
1919
!tests/**/node_modules
2020
npm-debug.log
2121
sftp-config.json
22+
.cache-eslint-remote-tester
23+
eslint-remote-tester-results
2224

2325
# Only apps should have lockfiles
2426
yarn.lock

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@
5252
"eslint-config-airbnb-base": "^14.2.1",
5353
"eslint-plugin-eslint-plugin": "^2.3.0",
5454
"eslint-plugin-import": "^2.22.1",
55+
"eslint-remote-tester": "^1.1.0",
56+
"eslint-remote-tester-repositories": "^0.0.1",
5557
"espree": "^3.5.4",
5658
"istanbul": "^0.4.5",
5759
"markdown-magic": "^1.0.0",

test/eslint-remote-tester.config.js

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
'use strict';
2+
3+
const eslintRemoteTesterRepositories = require('eslint-remote-tester-repositories');
4+
5+
module.exports = {
6+
repositories: eslintRemoteTesterRepositories.getRepositories({randomize: true}),
7+
8+
pathIgnorePattern: eslintRemoteTesterRepositories.getPathIgnorePattern(),
9+
10+
extensions: ['js', 'jsx', 'ts', 'tsx'],
11+
12+
/** Empty array since we are only interested in linter crashes */
13+
rulesUnderTesting: [],
14+
15+
concurrentTasks: 3,
16+
17+
logLevel: 'info',
18+
19+
/** Optional boolean flag used to enable caching of cloned repositories. For CIs it's ideal to disable caching. Defauls to true. */
20+
cache: false,
21+
22+
eslintrc: {
23+
root: true,
24+
env: {
25+
es6: true
26+
},
27+
parser: '@typescript-eslint/parser',
28+
parserOptions: {
29+
ecmaVersion: 2020,
30+
sourceType: 'module',
31+
ecmaFeatures: {
32+
jsx: true
33+
}
34+
},
35+
settings: {
36+
react: {
37+
version: '16.13.1'
38+
}
39+
},
40+
extends: ['plugin:react/all']
41+
}
42+
};

0 commit comments

Comments
 (0)