Skip to content

Commit 0894132

Browse files
AriPerkkioljharb
authored andcommitted
[Tests] add weekly scheduled smoke tests
1 parent 239b661 commit 0894132

File tree

5 files changed

+72
-0
lines changed

5 files changed

+72
-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' || github.event_name == 'workflow_dispatch' }}
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: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ node_modules
1919
!tests/**/node_modules
2020
npm-debug.log
2121
sftp-config.json
22+
eslint-remote-tester-results
2223

2324
# Only apps should have lockfiles
2425
yarn.lock

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ This change log adheres to standards from [Keep a CHANGELOG](http://keepachangel
2323
* [Refactor] `utils/Components`: correct spelling and delete unused code ([#3026][] @ohhoney1)
2424
* [Docs] [`jsx-uses-react`], [`react-in-jsx-scope`]: document [`react/jsx-runtime`] config ([#3018][] @pkuczynski @ljharb)
2525
* [Docs] [`require-default-props`]: fix small typo ([#2994][] @evsasse)
26+
* [Tests] add weekly scheduled smoke tests ([#2963][] @AriPerkkio)
2627

2728
[#3038]: https://github.com/yannickcr/eslint-plugin-react/pull/3038
2829
[#3036]: https://github.com/yannickcr/eslint-plugin-react/issues/3036
@@ -35,6 +36,7 @@ This change log adheres to standards from [Keep a CHANGELOG](http://keepachangel
3536
[#2998]: https://github.com/yannickcr/eslint-plugin-react/pull/2998
3637
[#2994]: https://github.com/yannickcr/eslint-plugin-react/pull/2994
3738
[#2992]: https://github.com/yannickcr/eslint-plugin-react/pull/2992
39+
[#2963]: https://github.com/yannickcr/eslint-plugin-react/pull/2963
3840
[#1617]: https://github.com/yannickcr/eslint-plugin-react/pull/1617
3941
[#1547]: https://github.com/yannickcr/eslint-plugin-react/pull/1547
4042

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@
5353
"eslint-config-airbnb-base": "^14.2.1",
5454
"eslint-plugin-eslint-plugin": "^2.3.0 || ^3.3.1",
5555
"eslint-plugin-import": "^2.23.4",
56+
"eslint-remote-tester": "^1.3.0",
57+
"eslint-remote-tester-repositories": "^0.0.2",
5658
"espree": "^3.5.4",
5759
"istanbul": "^0.4.5",
5860
"markdown-magic": "^2.0.0",

test/eslint-remote-tester.config.js

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
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+
concurrentTasks: 3,
13+
14+
logLevel: 'info',
15+
16+
/** Optional boolean flag used to enable caching of cloned repositories. For CIs it's ideal to disable caching. Defauls to true. */
17+
cache: false,
18+
19+
eslintrc: {
20+
root: true,
21+
env: {
22+
es6: true
23+
},
24+
parser: '@typescript-eslint/parser',
25+
parserOptions: {
26+
ecmaVersion: 2020,
27+
sourceType: 'module',
28+
ecmaFeatures: {
29+
jsx: true
30+
}
31+
},
32+
settings: {
33+
react: {
34+
version: '16.13.1'
35+
}
36+
},
37+
extends: ['plugin:react/all']
38+
}
39+
};

0 commit comments

Comments
 (0)