From fc0034baf99c161e28a1385cdabc92286987df7f Mon Sep 17 00:00:00 2001 From: vigneshk-tw Date: Wed, 23 Oct 2024 10:38:18 +0530 Subject: [PATCH 1/5] initial commit --- .github/workflows/build-test-lint.yml | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-test-lint.yml b/.github/workflows/build-test-lint.yml index 63fb1487..5d5a2bde 100644 --- a/.github/workflows/build-test-lint.yml +++ b/.github/workflows/build-test-lint.yml @@ -32,6 +32,24 @@ jobs: # run: dotnet format --verify-no-changes # working-directory: Xero-NetStandard - # - name: Run Test - # run: dotnet test - # working-directory: Xero-NetStandard \ No newline at end of file + - name: Set up Node environment + uses: actions/setup-node@v2 + with: + node-version: 20 + + - name: Install Prism + run: npm install -g @stoplight/prism-cli + + - name: Start PRISM Server + run: | + ./start-prism.sh & sleep 15 + working-directory: Xero-NetStandard/Xero.NetStandard.OAuth2.Test/util + + - name: Run Test + run: dotnet test + working-directory: Xero-NetStandard + + - name: Stop PRISM + if: success() || failure() + run: pkill -f prism + working-directory: Xero-NetStandard \ No newline at end of file From 38982aa68a9b5658294f859a86fe8c763c47fbc1 Mon Sep 17 00:00:00 2001 From: vigneshk-tw Date: Wed, 23 Oct 2024 10:40:10 +0530 Subject: [PATCH 2/5] updates start step --- Xero.NetStandard.OAuth2.Test/util/start-prism.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Xero.NetStandard.OAuth2.Test/util/start-prism.sh b/Xero.NetStandard.OAuth2.Test/util/start-prism.sh index b9b564dd..f6d3aa00 100644 --- a/Xero.NetStandard.OAuth2.Test/util/start-prism.sh +++ b/Xero.NetStandard.OAuth2.Test/util/start-prism.sh @@ -1,3 +1,5 @@ +#!/bin/bash + prism mock https://raw.githubusercontent.com/XeroAPI/Xero-OpenAPI/refs/heads/master/xero_accounting.yaml --host 127.0.0.1 --port 4010 & prism mock https://raw.githubusercontent.com/XeroAPI/Xero-OpenAPI/refs/heads/master/xero-app-store.yaml --host 127.0.0.1 --port 4011 & prism mock https://raw.githubusercontent.com/XeroAPI/Xero-OpenAPI/refs/heads/master/xero_assets.yaml --host 127.0.0.1 --port 4012 & From 9cc642bf245a1d74471a72e0d2c30089984dd066 Mon Sep 17 00:00:00 2001 From: vigneshk-tw Date: Wed, 23 Oct 2024 10:43:36 +0530 Subject: [PATCH 3/5] make the script executable --- .github/workflows/build-test-lint.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-test-lint.yml b/.github/workflows/build-test-lint.yml index 5d5a2bde..55d33a19 100644 --- a/.github/workflows/build-test-lint.yml +++ b/.github/workflows/build-test-lint.yml @@ -52,4 +52,5 @@ jobs: - name: Stop PRISM if: success() || failure() run: pkill -f prism - working-directory: Xero-NetStandard \ No newline at end of file + working-directory: Xero-NetStandard + \ No newline at end of file From 193381e893d361bc93cc4ea2504a950da11700c1 Mon Sep 17 00:00:00 2001 From: vigneshk-tw Date: Wed, 23 Oct 2024 10:44:52 +0530 Subject: [PATCH 4/5] adds removed code --- Xero.NetStandard.OAuth2.Test/util/start-prism.sh | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 Xero.NetStandard.OAuth2.Test/util/start-prism.sh diff --git a/Xero.NetStandard.OAuth2.Test/util/start-prism.sh b/Xero.NetStandard.OAuth2.Test/util/start-prism.sh old mode 100644 new mode 100755 From 0e1d6f08fb9929e9db60048054ded2dd424fc32a Mon Sep 17 00:00:00 2001 From: vigneshk-tw Date: Wed, 23 Oct 2024 10:48:12 +0530 Subject: [PATCH 5/5] cleanup --- .github/workflows/build-test-lint.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-test-lint.yml b/.github/workflows/build-test-lint.yml index 55d33a19..7628e7d4 100644 --- a/.github/workflows/build-test-lint.yml +++ b/.github/workflows/build-test-lint.yml @@ -41,8 +41,7 @@ jobs: run: npm install -g @stoplight/prism-cli - name: Start PRISM Server - run: | - ./start-prism.sh & sleep 15 + run: ./start-prism.sh & sleep 15 working-directory: Xero-NetStandard/Xero.NetStandard.OAuth2.Test/util - name: Run Test @@ -52,5 +51,4 @@ jobs: - name: Stop PRISM if: success() || failure() run: pkill -f prism - working-directory: Xero-NetStandard - \ No newline at end of file + working-directory: Xero-NetStandard \ No newline at end of file