From f4165dca418ba82bdbfc96b0d56385a824b74af3 Mon Sep 17 00:00:00 2001 From: William Calderipe Date: Fri, 12 Jan 2024 19:30:48 +0100 Subject: [PATCH] Add GitHub workflow for the @narval/transaction-request-intent Prevent workflows to run on changes in any other workflow configuration. --- .github/workflows/authz_ci.yml | 2 +- .github/workflows/orchestration_ci.yml | 2 +- .../transaction_request_intent_ci.yml | 44 +++++++++++++++++++ Makefile | 1 + packages/transaction-request-intent/Makefile | 4 ++ 5 files changed, 51 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/transaction_request_intent_ci.yml create mode 100644 packages/transaction-request-intent/Makefile diff --git a/.github/workflows/authz_ci.yml b/.github/workflows/authz_ci.yml index 53ef170c1..5133247a8 100644 --- a/.github/workflows/authz_ci.yml +++ b/.github/workflows/authz_ci.yml @@ -4,7 +4,7 @@ on: push: paths: - apps/authz/** - - .github/workflows/** + - .github/workflows/authz_ci.yml - Makefile - jest.config.ts - jest.preset.js diff --git a/.github/workflows/orchestration_ci.yml b/.github/workflows/orchestration_ci.yml index 0abb5f81d..7488a9874 100644 --- a/.github/workflows/orchestration_ci.yml +++ b/.github/workflows/orchestration_ci.yml @@ -4,7 +4,7 @@ on: push: paths: - apps/orchestration/** - - .github/workflows/** + - .github/workflows/orchestration_ci.yml - Makefile - jest.config.ts - jest.preset.js diff --git a/.github/workflows/transaction_request_intent_ci.yml b/.github/workflows/transaction_request_intent_ci.yml new file mode 100644 index 000000000..370653b2d --- /dev/null +++ b/.github/workflows/transaction_request_intent_ci.yml @@ -0,0 +1,44 @@ +name: Transaction Request Intent CI + +on: + push: + paths: + - packages/transaction-request-intent/** + - .github/workflows/transaction_request_intent_ci.yml + - Makefile + - jest.config.ts + - jest.preset.js + - .eslintrc.json + - .prettierrc + - package.json + - package-lock.json + +jobs: + build-and-test: + name: Build and test + + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@master + + - name: Install Node.js + uses: actions/setup-node@v3 + with: + node-version: '20.4.0' + + - name: Install dependencies + run: | + make install/ci + + - name: Code format + shell: bash + run: | + make format/check + make lint/check + + - name: Test unit + shell: bash + run: | + make transaction-request-intent/test/unit diff --git a/Makefile b/Makefile index b41dcaa86..e7cce5c83 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,6 @@ include ./apps/authz/Makefile include ./apps/orchestration/Makefile +include ./packages/transaction-request-intent/Makefile # For more terminal color codes, head over to https://opensource.com/article/19/9/linux-terminal-colors TERM_NO_COLOR := \033[0m diff --git a/packages/transaction-request-intent/Makefile b/packages/transaction-request-intent/Makefile new file mode 100644 index 000000000..a2f17a2e3 --- /dev/null +++ b/packages/transaction-request-intent/Makefile @@ -0,0 +1,4 @@ +TRANSACTION_REQUEST_INTENT_PROJECT_NAME := transaction-request-intent + +transaction-request-intent/test/unit: + npx nx test:unit ${TRANSACTION_REQUEST_INTENT_PROJECT_NAME}