Skip to content

Commit 8e04368

Browse files
authored
test: replace custom smoke test step with github action (#227)
1 parent 9cf6351 commit 8e04368

File tree

4 files changed

+26
-528
lines changed

4 files changed

+26
-528
lines changed

.github/workflows/smoke-test.yml

+15-13
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,23 @@ name: Smoke test
22

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

88
jobs:
9-
lint:
9+
test:
1010
runs-on: ubuntu-latest
1111
steps:
12-
- uses: actions/checkout@v2
13-
- uses: actions/setup-node@v2
14-
with:
15-
node-version: 16
16-
- run: yarn install
17-
- run: yarn build
18-
- run: yarn link
19-
- run: yarn link eslint-plugin-jest-dom
20-
- run: yarn test:smoke
21-
env:
22-
CI: true
12+
- uses: actions/checkout@v2
13+
- uses: actions/setup-node@v2
14+
with:
15+
node-version: 16
16+
- run: |
17+
npm install
18+
npm run build
19+
npm link
20+
npm link eslint-plugin-jest-dom
21+
- uses: AriPerkkio/eslint-remote-tester-run-action@v2
22+
with:
23+
issue-title: "Results of weekly scheduled smoke test"
24+
eslint-remote-tester-config: smoke-test/eslint-remote-tester.config.js

package.json

+2-3
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@
3535
"lint": "kcd-scripts lint",
3636
"setup": "npm install && npm run validate -s",
3737
"test": "kcd-scripts test",
38-
"test:smoke": "eslint-remote-tester --config ./smoke-test/eslint-remote-tester.config.js",
3938
"test:update": "npm test -- --updateSnapshot --coverage",
4039
"validate": "kcd-scripts validate"
4140
},
@@ -47,7 +46,8 @@
4746
"devDependencies": {
4847
"@typescript-eslint/parser": "^4.31.1",
4948
"eslint": "^7.31.0",
50-
"eslint-remote-tester": "^1.3.1",
49+
"eslint-remote-tester": "^2.0.1",
50+
"eslint-remote-tester-repositories": "^0.0.3",
5151
"jest-extended": "^0.11.5",
5252
"kcd-scripts": "^11.2.2",
5353
"typescript": "^4.4.3"
@@ -68,7 +68,6 @@
6868
"node_modules",
6969
"coverage",
7070
"dist",
71-
".cache-eslint-remote-tester",
7271
"eslint-remote-tester-results"
7372
],
7473
"engines": {
+9-32
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,15 @@
1-
module.exports = {
2-
/** Repositories to scan */
3-
repositories: require("./repositories"),
1+
const {
2+
getRepositories,
3+
getPathIgnorePattern,
4+
} = require("eslint-remote-tester-repositories");
45

5-
/** Extensions of files under scanning */
6+
module.exports = {
7+
repositories: getRepositories({ randomize: true }),
8+
pathIgnorePattern: getPathIgnorePattern(),
69
extensions: ["js", "jsx", "ts", "tsx"],
7-
8-
/** Optional pattern used to exclude paths */
9-
pathIgnorePattern: `(${[
10-
"node_modules",
11-
"\\/\\.", // Any file or directory starting with dot, e.g. ".git"
12-
"/dist/",
13-
"/build/",
14-
15-
// Common patterns for minified JS
16-
"babel\\.js",
17-
"vendor\\.js",
18-
"vendors\\.js",
19-
"chunk\\.js",
20-
"bundle\\.js",
21-
"react-dom\\.development\\.js",
22-
"\\.min\\.js", // Any *.min.js
23-
].join("|")})`,
24-
25-
/** Empty array since we are only interested in linter crashes */
26-
rulesUnderTesting: [],
27-
28-
/** Maximum amount of tasks ran concurrently */
29-
concurrentTasks: 2,
30-
31-
/** Optional boolean flag used to enable caching of cloned repositories. For CIs it's ideal to disable caching. Defauls to true. */
10+
concurrentTasks: 3,
3211
cache: false,
33-
34-
/** ESLint configuration */
12+
logLevel: "info",
3513
eslintrc: {
3614
root: true,
3715
env: {
@@ -45,7 +23,6 @@ module.exports = {
4523
jsx: true,
4624
},
4725
},
48-
plugins: ["jest-dom"],
4926
extends: ["plugin:jest-dom/all"],
5027
},
5128
};

0 commit comments

Comments
 (0)