From 37eb578843f204cf6c508f9b3f6991b6b28a1442 Mon Sep 17 00:00:00 2001 From: Timo Glastra Date: Fri, 26 May 2023 11:06:58 +0200 Subject: [PATCH] ci: add basic ci Signed-off-by: Timo Glastra --- .github/workflows/continuous-integration.yml | 38 ++++++++++++++++++++ .vscode/settings.json | 3 ++ package.json | 3 +- 3 files changed, 43 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/continuous-integration.yml create mode 100644 .vscode/settings.json diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml new file mode 100644 index 0000000..5d88a5f --- /dev/null +++ b/.github/workflows/continuous-integration.yml @@ -0,0 +1,38 @@ +name: Continuous Integration + +on: + push: + branches: + - main + pull_request: + branches: + - main + +jobs: + validate: + name: Validate + runs-on: ubuntu-20.04 + + steps: + - name: Check the repository + uses: actions/checkout@v2 + + - name: Validate + uses: ./.github/actions/validate + with: + node-version: 16.x + uses-libindy: true + + test: + name: Test + needs: validate + runs-on: ubuntu-20.04 + + steps: + - name: Check the repository + uses: actions/checkout@v2 + - name: Test + uses: ./.github/actions/test + with: + node-version: 16.x + uses-libindy: true diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..25fa621 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "typescript.tsdk": "node_modules/typescript/lib" +} diff --git a/package.json b/package.json index 4ab0e92..0456409 100644 --- a/package.json +++ b/package.json @@ -23,7 +23,8 @@ "compile": "tsc -p tsconfig.build.json", "prepublishOnly": "yarn run build", "dev": "ts-node dev", - "start": "NODE_ENV=production node build/index.js" + "start": "NODE_ENV=production node build/index.js", + "validate": "yarn build && yarn check-format" }, "devDependencies": { "@types/express": "^4.17.13",