From 43c328ad732bdec77ca3eb7f253bceebaeeaf5be Mon Sep 17 00:00:00 2001 From: Vignesh Kennadi Date: Fri, 6 Sep 2024 16:46:32 +0530 Subject: [PATCH 1/2] PETOSS-529 - Create Github Workflow for Node SDK to Build, Test and Lint --- .github/workflows/build-lint-test.yml | 35 +++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .github/workflows/build-lint-test.yml diff --git a/.github/workflows/build-lint-test.yml b/.github/workflows/build-lint-test.yml new file mode 100644 index 00000000..7431c601 --- /dev/null +++ b/.github/workflows/build-lint-test.yml @@ -0,0 +1,35 @@ +name: Node Build, Lint and Test + +on: + push: + +jobs: + build-test-lint: + runs-on: ubuntu-latest + + steps: + - name: Checkout xero-node repo + uses: actions/checkout@v4 + with: + repository: XeroAPI/xero-node + path: xero-node + + - name: Set up Node environment + uses: actions/setup-node@v4 + with: + node-version: 20 + cache: 'npm' + cache-dependency-path: '**/package-lock.json' + + + - name: Install dependencies + run: npm ci + working-directory: xero-python + + - name: Run Build + run: npm run build + working-directory: xero-node + + - name: Run Tests + run: npm run test + working-directory: xero-node From b5806a315b82d367c48b28d6335142b66ffdfe9a Mon Sep 17 00:00:00 2001 From: Vignesh Kennadi Date: Fri, 6 Sep 2024 16:47:32 +0530 Subject: [PATCH 2/2] update directory location --- .github/workflows/build-lint-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-lint-test.yml b/.github/workflows/build-lint-test.yml index 7431c601..6c96777d 100644 --- a/.github/workflows/build-lint-test.yml +++ b/.github/workflows/build-lint-test.yml @@ -24,7 +24,7 @@ jobs: - name: Install dependencies run: npm ci - working-directory: xero-python + working-directory: xero-node - name: Run Build run: npm run build