Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 4 additions & 37 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ jobs:
run: |
yarn dedupe
git diff --exit-code --quiet yarn.lock || (echo "yarn.lock is not up to date, run 'yarn dedupe'" && exit 1)
build:
name: Build
build_test:
name: Build & Test
runs-on: ubuntu-22.04
needs:
- configure
Expand All @@ -63,40 +63,8 @@ jobs:
run: yarn install --immutable
- name: Build
run: yarn build
test-unit:
name: Test (Unit)
runs-on: ubuntu-22.04
needs:
- configure
- build
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ needs.configure.outputs.commit-sha }}
- name: Setup Node.js
uses: abinnovision/actions@setup-node-v1
- name: Install dependencies
run: yarn install --immutable
- name: Test
run: yarn test-unit
test-integration:
name: Test (Integration)
runs-on: ubuntu-22.04
needs:
- configure
- build
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ needs.configure.outputs.commit-sha }}
- name: Setup Node.js
uses: abinnovision/actions@setup-node-v1
- name: Install dependencies
run: yarn install --immutable
- name: Test
run: yarn test-integration
run: yarn run test
release:
name: Release
uses: abinnovision/workflows/.github/workflows/release-please.yaml@master
Expand All @@ -111,8 +79,7 @@ jobs:
runs-on: ubuntu-22.04
needs:
- configure
- build
- test-unit
- build_test
- release
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
env:
Expand Down
16 changes: 9 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,12 @@
"sort:check": "sort-package-json --check",
"sort:fix": "sort-package-json",
"start:dev": "dotenv -v NODE_ENV=development -c development -- nodemon",
"test-integration": "vitest --run --coverage --config vitest.config.integration.mts",
"test-integration:watch": "vitest --config vitest.config.integration.mts",
"test-unit": "vitest --run --coverage --config vitest.config.unit.mts",
"test-unit:watch": "vitest --config vitest.config.unit.mts"
"test": "vitest --run --coverage",
"test:watch": "vitest",
"test-integration": "vitest --run --coverage --project \\*#integration",
"test-integration:watch": "vitest --project \\*#integration",
"test-unit": "vitest --run --coverage --project \\*#unit",
"test-unit:watch": "vitest --project \\*#unit"
},
"commitlint": {
"extends": [
Expand Down Expand Up @@ -76,7 +78,7 @@
"@types/express": "^4",
"@types/node": "^22.13.1",
"@types/supertest": "^6.0.2",
"@vitest/coverage-v8": "^2.1.1",
"@vitest/coverage-v8": "^3.0.5",
"cpy": "^11.1.0",
"dotenv-cli": "^8.0.0",
"esbuild": "^0.25.0",
Expand All @@ -86,15 +88,15 @@
"globals": "^15.15.0",
"husky": "^9.1.7",
"lint-staged": "^15.4.3",
"nock": "^14.0.0-beta.6",
"nock": "^14.0.1",
"nodemon": "^3.1.4",
"oauth2-mock-server": "^7.2.0",
"prettier": "^3.5.1",
"sort-package-json": "^2.14.0",
"supertest": "^7.0.0",
"ts-node": "^10.9.2",
"typescript": "^5.7.3",
"vitest": "^2.1.1"
"vitest": "^3.0.5"
},
"packageManager": "yarn@4.6.0"
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import nock from "nock";
import request from "supertest";
import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";

import { setupOAuthServer } from "../utils/setup-oauth-server.js";
import { testDataIdTokenClaims } from "../utils/test-data.js";
import { setupOAuthServer } from "../../utils/setup-oauth-server.js";
import { testDataIdTokenClaims } from "../../utils/test-data.js";

import type { Agent } from "supertest";

Expand Down Expand Up @@ -33,7 +33,7 @@ describe("dispatch-handler", () => {

describe("default config", () => {
beforeEach(async () => {
const bootstrap = await import("../../src/bootstrap.js");
const bootstrap = await import("../../../src/bootstrap.js");

// Save the shutdown handler for later.
shutdownHandler = (await bootstrap.bootstrap).shutdown;
Expand Down
7 changes: 1 addition & 6 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,6 @@
"resolveJsonModule": true,
"noEmit": true
},
"include": [
"src/**/*.ts",
"test/**/*.ts",
"vitest.config.*.ts",
"shims.d.ts"
],
"include": ["src/**/*.ts", "test/**/*.ts", "vitest.config.ts", "shims.d.ts"],
"exclude": ["node_modules"]
}
24 changes: 0 additions & 24 deletions vitest.config.integration.mts

This file was deleted.

36 changes: 36 additions & 0 deletions vitest.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
import { defineConfig } from "vitest/config";

export default defineConfig({
assetsInclude: ["**/*.yaml"],
define: {
"process.env.POLICY_DIR": `"./policies"`,
},
test: {
environment: "node",
coverage: {
provider: "v8",
all: true,
include: ["src/**/*.{ts,tsx}"],
reporter: [["lcovonly"], "text"],
},
workspace: [
{
extends: true,
test: {
name: "github-workflow-dispatch-proxy#unit",
include: ["src/**/*.spec.ts"],
},
},
{
extends: true,
test: {
name: "github-workflow-dispatch-proxy#integration",
include: ["test/integration/**/*.spec-integration.ts"],
sequence: {
hooks: "stack",
},
},
},
],
},
});
21 changes: 0 additions & 21 deletions vitest.config.unit.mts

This file was deleted.

Loading
Loading