diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml deleted file mode 100644 index cb33ad962..000000000 --- a/.github/workflows/integration.yml +++ /dev/null @@ -1,74 +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 - sed -i 's/"ignore": \["src\/gql"]/\"ignore\": \["src\/gql\/\*\*"]/g' knip.json - sed -i 's/"ignore": \["db", "knexfile.js", "src\/graphql\/__generated__"]/\"ignore\": \["db\/\*\*", "knexfile.js", "src\/graphql\/__generated__\/\*\*"]/g' knip.json - sed -i 's/"ignore": \["playwright.config.mjs", "examples"]/\"ignore\": \["playwright.config.mjs", "examples\/\*\*"]/g' knip.json - sed -i '/Objection/d' apps/backend/src/database/index.ts - cat knip.json - 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