diff --git a/.github/workflows/smoke-test.yml b/.github/workflows/smoke-test.yml new file mode 100644 index 0000000000..853f13cda8 --- /dev/null +++ b/.github/workflows/smoke-test.yml @@ -0,0 +1,23 @@ +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 + npm link + npm link eslint-plugin-react + - uses: AriPerkkio/eslint-remote-tester-run-action@v1 + with: + issue-title: "Results of weekly scheduled smoke test" + eslint-remote-tester-config: test/eslint-remote-tester.config.js diff --git a/.gitignore b/.gitignore index a7d00f359e..261481b8e3 100644 --- a/.gitignore +++ b/.gitignore @@ -19,6 +19,8 @@ node_modules !tests/**/node_modules npm-debug.log sftp-config.json +.cache-eslint-remote-tester +eslint-remote-tester-results # Only apps should have lockfiles yarn.lock diff --git a/package.json b/package.json index 23df693cf7..c553bcb69b 100644 --- a/package.json +++ b/package.json @@ -52,6 +52,8 @@ "eslint-config-airbnb-base": "^14.2.1", "eslint-plugin-eslint-plugin": "^2.3.0", "eslint-plugin-import": "^2.22.1", + "eslint-remote-tester": "^1.1.0", + "eslint-remote-tester-repositories": "^0.0.1", "espree": "^3.5.4", "istanbul": "^0.4.5", "markdown-magic": "^1.0.0", diff --git a/test/eslint-remote-tester.config.js b/test/eslint-remote-tester.config.js new file mode 100644 index 0000000000..e7a478ff55 --- /dev/null +++ b/test/eslint-remote-tester.config.js @@ -0,0 +1,40 @@ +'use strict'; + +const eslintRemoteTesterRepositories = require('eslint-remote-tester-repositories'); + +module.exports = { + repositories: eslintRemoteTesterRepositories.getRepositories({randomize: true}), + + pathIgnorePattern: eslintRemoteTesterRepositories.getPathIgnorePattern(), + + extensions: ['js', 'jsx', 'ts', 'tsx'], + + /** Empty array since we are only interested in linter crashes */ + rulesUnderTesting: [], + + 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, + + eslintrc: { + root: true, + env: { + es6: true + }, + parser: '@typescript-eslint/parser', + parserOptions: { + ecmaVersion: 2020, + sourceType: 'module', + ecmaFeatures: { + jsx: true + } + }, + settings: { + react: { + version: '16.13.1' + } + }, + extends: ['plugin:react/all'] + } +};