From 3cd4ba0797ca615f976fd13fac3f46cf310d42c6 Mon Sep 17 00:00:00 2001 From: Lenz Weber-Tronic Date: Fri, 11 Oct 2024 14:13:12 +0200 Subject: [PATCH] add CI run --- .github/workflows/ci.yml | 29 +++++++++++++++++++++++++++++ package.json | 6 +++--- tsconfig.json | 2 +- 3 files changed, 33 insertions(+), 4 deletions(-) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 000000000..9e9b51e3a --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,29 @@ +name: CI + +on: + pull_request: + push: + branches: + - '**' + tags: + - '!**' + +jobs: + ci: + name: CI + runs-on: ubuntu-latest + steps: + - name: Checkout repo + uses: actions/checkout@v4 + + - name: Setup Node.js 20.x + uses: actions/setup-node@v4 + with: + node-version: 20.x + cache: yarn + + - name: Install dependencies + run: yarn install + + - name: Run tests, lint and verify package integrity + run: yarn run validate diff --git a/package.json b/package.json index b7f9b8a8b..04b93dae9 100644 --- a/package.json +++ b/package.json @@ -86,9 +86,9 @@ "format": "kcd-scripts format", "lint": "kcd-scripts lint --config .eslintrc.cjs", "test": "kcd-scripts test --config jest.config.cjs", - "verify": "attw --pack . && publint", - "typecheck": "kcd-scripts typecheck --build", - "validate": "CI=true kcd-scripts validate verify,lint,typecheck,test" + "pack-and-verify": "attw --pack . && publint", + "typecheck": "kcd-scripts typecheck --build --noEmit", + "validate": "npm run pack-and-verify; CI=true kcd-scripts validate lint,typecheck,test" }, "packageManager": "yarn@4.5.0", "resolutions": { diff --git a/tsconfig.json b/tsconfig.json index 8e264d6f2..719f08c07 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -4,7 +4,7 @@ "module": "NodeNext", "moduleResolution": "NodeNext", "target": "esnext", - "rootDir": "src", + "rootDir": ".", "outDir": "dist", "declaration": true, "sourceMap": true,