From 7ba481f99ef8b3413f62ca38f74c8783619542cd Mon Sep 17 00:00:00 2001 From: Lars Kappert Date: Thu, 13 Jun 2024 09:37:15 +0200 Subject: [PATCH] Simplify CI setup --- .github/workflows/integration.yml | 63 ---------------------------- .github/workflows/test-ts-latest.yml | 25 ----------- .github/workflows/test.yml | 23 ++++++---- 3 files changed, 14 insertions(+), 97 deletions(-) delete mode 100644 .github/workflows/integration.yml delete mode 100644 .github/workflows/test-ts-latest.yml diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml deleted file mode 100644 index 694cdb433..000000000 --- a/.github/workflows/integration.yml +++ /dev/null @@ -1,63 +0,0 @@ -name: Run Knip against external projects - -on: - workflow_dispatch: - pull_request: - push: - branches: - - '**' - tags: - - '!**' - -jobs: - integration: - name: integration - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: pnpm/action-setup@v2 - with: - version: 8 - - run: cd packages/knip && npm install && npm run build && npm link - - - name: Test Knip against create-typescript-app - uses: actions/checkout@v4 - with: - repository: JoshuaKGoldberg/create-typescript-app - path: create-typescript-app - - run: cd create-typescript-app && pnpm install && knip - - - name: Test Knip against slonik - uses: actions/checkout@v4 - with: - repository: gajus/slonik - path: slonik - - run: cd slonik && npm ci && knip - - - name: Test Knip against 10ten-ja-reader - uses: actions/checkout@v4 - with: - repository: birchill/10ten-ja-reader - path: 10ten-ja-reader - - run: cd 10ten-ja-reader && pnpm install && knip - - - name: Test Knip against DefinitelyTyped-tools - uses: actions/checkout@v4 - with: - repository: microsoft/DefinitelyTyped-tools - path: DefinitelyTyped-tools - - run: cd DefinitelyTyped-tools && pnpm install && knip - - - name: Test Knip against TanStack/query - uses: actions/checkout@v4 - with: - repository: TanStack/query - path: query - - run: cd query && pnpm install && knip - - - name: Test Knip against argos-ci/argos - uses: actions/checkout@v4 - with: - repository: argos-ci/argos - path: argos - - run: cd argos && npm install && knip diff --git a/.github/workflows/test-ts-latest.yml b/.github/workflows/test-ts-latest.yml deleted file mode 100644 index 7a65f4326..000000000 --- a/.github/workflows/test-ts-latest.yml +++ /dev/null @@ -1,25 +0,0 @@ -name: Tests (against typescript@latest) - -on: - workflow_dispatch: - pull_request: - push: - branches: - - '**' - tags: - - '!**' - -jobs: - test: - runs-on: ubuntu-latest - name: Ubuntu/Node v20 - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 - with: - node-version: 20 - - run: npm install typescript@latest - - run: npm run build --workspace packages/knip - - run: npx knip - - run: npx knip --production --strict - - run: npm test --workspaces --if-present diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 8f80e177e..4ec9ffe32 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -25,14 +25,19 @@ jobs: name: ${{ matrix.os }} (Node v${{ matrix.node }}) steps: - - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 with: node-version: ${{ matrix.node }} - cache: 'npm' - - run: npm install typescript@5.0.4 @types/node@18 - - run: npm run lint --workspaces --if-present - - run: npm run build --workspace packages/knip - - run: npx knip - - run: npx knip --production --strict - - run: npm test --workspaces --if-present + - name: Install dependencies + run: npm install typescript@5.0.4 @types/node@18 --ignore-scripts + - name: Build knip + run: npm run build + working-directory: packages/knip + - name: Run knip + run: npx knip + - name: Run knip (production/strict) + run: npx knip --production --strict + - name: Test knip + run: npm run test:node + working-directory: packages/knip