Skip to content

Commit

Permalink
[Tests]: add weekly scheduled smoke tests
Browse files Browse the repository at this point in the history
  • Loading branch information
AriPerkkio committed Apr 30, 2021
1 parent d8590bb commit b82263e
Show file tree
Hide file tree
Showing 4 changed files with 74 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/smoke-test.yml
@@ -0,0 +1,28 @@
name: Smoke test

on:
schedule:
- cron: '0 0 * * SUN'
workflow_dispatch:

jobs:
lint:
if: ${{ github.repository == 'yannickcr/eslint-plugin-react' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 14
- uses: ljharb/actions/node/install@main
name: 'nvm install lts/* && npm install'
with:
node-version: 'lts/*'
skip-ls-check: true
- run: |
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
2 changes: 2 additions & 0 deletions .gitignore
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions package.json
Expand Up @@ -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",
Expand Down
42 changes: 42 additions & 0 deletions test/eslint-remote-tester.config.js
@@ -0,0 +1,42 @@
'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,

logLevel: 'info',

/** 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']
}
};

0 comments on commit b82263e

Please sign in to comment.