Skip to content

Commit

Permalink
Petoss 585 enable test step in code gen and sdk repos (#572)
Browse files Browse the repository at this point in the history
* initial commit

* updates start step

* make the script executable

* adds removed code

* cleanup

---------

Co-authored-by: vigneshk-tw <[email protected]>
  • Loading branch information
vigneshk-tw and vigneshk-tw authored Oct 23, 2024
1 parent 2dced9d commit 81c7f5e
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 3 deletions.
23 changes: 20 additions & 3 deletions .github/workflows/build-test-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,23 @@ jobs:
# run: dotnet format --verify-no-changes
# working-directory: Xero-NetStandard

# - name: Run Test
# run: dotnet test
# working-directory: Xero-NetStandard
- 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
2 changes: 2 additions & 0 deletions Xero.NetStandard.OAuth2.Test/util/start-prism.sh
100644 → 100755
Original file line number Diff line number Diff line change
@@ -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 &
Expand Down

0 comments on commit 81c7f5e

Please sign in to comment.