Skip to content

Commit

Permalink
test: adds weekly scheduled smoke tests (#28)
Browse files Browse the repository at this point in the history
* test: adds weekly scheduled smoke tests

* chore: remove unused deps

Co-authored-by: Makuza Mugabo Verite <[email protected]>
  • Loading branch information
AriPerkkio and veritem authored Dec 24, 2022
1 parent a578e89 commit 1096d44
Show file tree
Hide file tree
Showing 5 changed files with 408 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/smoke-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Smoke test

on:
workflow_dispatch: # Manual trigger
schedule: # Every sunday at 00:00
- cron: "0 00 * * SUN"

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- uses: pnpm/action-setup@v2
with:
version: 7.16.1

- uses: actions/setup-node@v3
with:
node-version: 18.x
cache: pnpm

- name: Install, Build & Link plugin
run: |
pnpm install
pnpm build
pnpm link .
pnpm link eslint-plugin-vitest
- uses: AriPerkkio/eslint-remote-tester-run-action@v3
with:
issue-title: "Results of weekly scheduled smoke test"
eslint-remote-tester-config: eslint-remote-tester.config.ts
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
node_modules/
dist/
eslint-remote-tester-results/
41 changes: 41 additions & 0 deletions eslint-remote-tester.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
import type { Config } from "eslint-remote-tester";
import {
getPathIgnorePattern,
getRepositories,
} from "eslint-remote-tester-repositories";

import plugin from "eslint-plugin-vitest";

const config: Config = {
repositories: getRepositories(),
pathIgnorePattern: getPathIgnorePattern(),
extensions: ["js", "jsx", "ts", "tsx", "cts", "mts"],

concurrentTasks: 3,
cache: false,
logLevel: "info",

eslintrc: {
root: true,
env: { es6: true },
parserOptions: {
ecmaVersion: 2020,
sourceType: "module",
ecmaFeatures: { jsx: true },
},
overrides: [
{
files: ["*.ts", "*.tsx", "*.mts", "*.cts"],
parser: "@typescript-eslint/parser",
},
],

plugins: ["vitest"],
rules: Object.keys(plugin.rules).reduce(
(all, rule) => ({ ...all, [`vitest/${rule}`]: "error" }),
{}
),
},
};

export default config;
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@
"eslint-doc-generator": "^0.22.0",
"eslint-plugin-eslint-plugin": "^5.0.6",
"eslint-plugin-node": "^11.1.0",
"eslint-remote-tester": "^3.0.0",
"eslint-remote-tester-repositories": "^0.0.8",
"jiti": "^1.16.0",
"prettier": "^2.7.1",
"unbuild": "^0.9.4",
Expand Down
Loading

0 comments on commit 1096d44

Please sign in to comment.