From e4781729e0cb47840c2437ad137551e6a659ac2f Mon Sep 17 00:00:00 2001 From: JCNoguera <88061365+VmMad@users.noreply.github.com> Date: Fri, 19 Jan 2024 11:17:25 +0100 Subject: [PATCH] ci: add build check for pr (#969) * ci: add build check for pr * refactor: improve inflixDbClient code and disable fail-fast --------- Co-authored-by: Mario --- .github/workflows/pr-build-check.yaml | 29 +++++++++++++++++++++++++++ .husky/pre-push | 4 ---- package.json | 1 - 3 files changed, 29 insertions(+), 5 deletions(-) create mode 100644 .github/workflows/pr-build-check.yaml delete mode 100755 .husky/pre-push diff --git a/.github/workflows/pr-build-check.yaml b/.github/workflows/pr-build-check.yaml new file mode 100644 index 000000000..2236d061a --- /dev/null +++ b/.github/workflows/pr-build-check.yaml @@ -0,0 +1,29 @@ +name: PR build check + +on: + pull_request: + types: [opened, reopened, synchronize] + +jobs: + build-check: + strategy: + fail-fast: false + matrix: + project: [api, client] + runs-on: ubuntu-latest + defaults: + run: + working-directory: ${{ matrix.project }} + steps: + - uses: actions/checkout@v2 + + - name: Setup Node.js + uses: actions/setup-node@v2 + with: + node-version: "16" + + - name: Install Dependencies + run: npm install + + - name: Build Check + run: npm run build diff --git a/.husky/pre-push b/.husky/pre-push deleted file mode 100755 index b4c0b12de..000000000 --- a/.husky/pre-push +++ /dev/null @@ -1,4 +0,0 @@ -#!/usr/bin/env sh -. "$(dirname -- "$0")/_/husky.sh" - -npm run pre-push diff --git a/package.json b/package.json index ce1d1e301..2dfbff78c 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,6 @@ "setup:dev": "npm run clear && npm run prepare && npm run setup:client && npm run setup:api", "clear": "rimraf api/node_modules api/dist client/node_modules client/build", "dev": "concurrently 'cd api && npm run start-dev' 'cd client && npm run start'", - "pre-push": "concurrently 'cd api && npm run build-compile && npm run build-lint && npm run build-config' 'cd client && npm run build'", "prepare": "husky install", "format": "concurrently 'cd api && npm run format' 'cd client && npm run format'" },