From a5ef1046fc1cd555900ca4e5c74eb4b929c59d05 Mon Sep 17 00:00:00 2001 From: Makuza Mugabo Verite Date: Wed, 6 Apr 2022 11:00:54 +0200 Subject: [PATCH] fix: update ci build --- .github/workflows/ci.yml | 39 +++++-------------- {tests => src/rules}/assertion-type.test.ts | 2 +- {tests => src/rules}/lower-case-title.test.ts | 2 +- .../rules}/no-conditional-in-tests.test.ts | 2 +- {tests => src/rules}/no-skipped-tests.test.ts | 2 +- 5 files changed, 14 insertions(+), 33 deletions(-) rename {tests => src/rules}/assertion-type.test.ts (90%) rename {tests => src/rules}/lower-case-title.test.ts (92%) rename {tests => src/rules}/no-conditional-in-tests.test.ts (92%) rename {tests => src/rules}/no-skipped-tests.test.ts (89%) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 20cf7a9..1434799 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,42 +14,23 @@ jobs: fail-fast: false - steps: - - uses: actions/checkout@v3 - - uses: pnpm/action-setup@v2.2.1 - with: - version: 7.0.0-rc.2 - - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v3 - with: - node-version: ${{ matrix.node-version }} - cache: 'pnpm' - - - name: install - run: pnpm install - - - name: test - run: pnpm test:ci - - lint: - runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - - name: Install pnpm - uses: pnpm/action-setup@v2.2.1 with: version: 7.0.0-rc.2 - - name: Set node + - name: Use Node.js ${{ matrix.node-version }} uses: actions/setup-node@v3 with: - node-version: 17.x - cache: 'pnpm' + node-version: ${{ matrix.node-version }} + cache: "pnpm" + + - name: install + run: pnpm install - - name: Install - run: pnpm i + - name: lint + run: pnpm lint - - name: Lint - run: pnpm run lint + - name: test + run: pnpm test:ci diff --git a/tests/assertion-type.test.ts b/src/rules/assertion-type.test.ts similarity index 90% rename from tests/assertion-type.test.ts rename to src/rules/assertion-type.test.ts index 8b4e52c..439c4bc 100644 --- a/tests/assertion-type.test.ts +++ b/src/rules/assertion-type.test.ts @@ -1,6 +1,6 @@ import { RuleTester } from "@typescript-eslint/utils/dist/ts-eslint" import { it } from "vitest" -import { RULE_NAME } from "../src/rules/assertion-type" +import { RULE_NAME } from "./assertion-type" const valid = [`it.each()`] diff --git a/tests/lower-case-title.test.ts b/src/rules/lower-case-title.test.ts similarity index 92% rename from tests/lower-case-title.test.ts rename to src/rules/lower-case-title.test.ts index 6aa9705..938d302 100644 --- a/tests/lower-case-title.test.ts +++ b/src/rules/lower-case-title.test.ts @@ -1,6 +1,6 @@ import { RuleTester } from "@typescript-eslint/utils/dist/ts-eslint" import { it } from "vitest" -import rule, { RULE_NAME } from "../src/rules/lower-case-title" +import rule, { RULE_NAME } from "./lower-case-title" diff --git a/tests/no-conditional-in-tests.test.ts b/src/rules/no-conditional-in-tests.test.ts similarity index 92% rename from tests/no-conditional-in-tests.test.ts rename to src/rules/no-conditional-in-tests.test.ts index 9545f2d..1960917 100644 --- a/tests/no-conditional-in-tests.test.ts +++ b/src/rules/no-conditional-in-tests.test.ts @@ -1,6 +1,6 @@ import { RuleTester } from "@typescript-eslint/utils/dist/ts-eslint" import { it } from "vitest" -import rule, { RULE_NAME } from "../src/rules/no-conditional-in-tests" +import rule, { RULE_NAME } from "./no-conditional-in-tests" const invalids = [ `describe('my tests', () => { diff --git a/tests/no-skipped-tests.test.ts b/src/rules/no-skipped-tests.test.ts similarity index 89% rename from tests/no-skipped-tests.test.ts rename to src/rules/no-skipped-tests.test.ts index 552dad8..4d0d5ea 100644 --- a/tests/no-skipped-tests.test.ts +++ b/src/rules/no-skipped-tests.test.ts @@ -1,6 +1,6 @@ import { RuleTester } from "@typescript-eslint/utils/dist/ts-eslint" import { it } from "vitest" -import rule, { RULE_NAME } from "../src/rules/no-skipped-tests" +import rule, { RULE_NAME } from "./no-skipped-tests" const valids = [ `it("test", () => {});`,