From c2f94d4c71ee27bb52ddf822056d3ff6d1bdadd9 Mon Sep 17 00:00:00 2001 From: Avery-Littlemore <118071684+Avery-Littlemore@users.noreply.github.com> Date: Thu, 22 Aug 2024 11:25:15 -0400 Subject: [PATCH 1/2] Create nodejs.yaml Created GitHub Actions CI/CD workflow --- .github/workflows/nodejs.yaml | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .github/workflows/nodejs.yaml diff --git a/.github/workflows/nodejs.yaml b/.github/workflows/nodejs.yaml new file mode 100644 index 0000000..bec3f2e --- /dev/null +++ b/.github/workflows/nodejs.yaml @@ -0,0 +1,32 @@ +name: Node.js CI + +on: + push: + branches: + - main + pull_request: + branches: + - main + +jobs: + build: + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [20] + + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Setup Node.js + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node-version }} + + - name: Install dependencies + run: npm install + + - name: Run tests + run: npm test From 94b3f8416f992f98ccfd2db918c07fafcdd4b623 Mon Sep 17 00:00:00 2001 From: Avery-Littlemore <118071684+Avery-Littlemore@users.noreply.github.com> Date: Thu, 22 Aug 2024 11:28:27 -0400 Subject: [PATCH 2/2] Fix: Install dependencies in lambda folder in CI/CD workflow Fix: Install dependencies in lambda folder in CI/CD workflow --- .github/workflows/nodejs.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/nodejs.yaml b/.github/workflows/nodejs.yaml index bec3f2e..e55c881 100644 --- a/.github/workflows/nodejs.yaml +++ b/.github/workflows/nodejs.yaml @@ -25,8 +25,11 @@ jobs: with: node-version: ${{ matrix.node-version }} - - name: Install dependencies + - name: Install dependencies in main folder run: npm install + - name: Install dependencies in lambda folder + run: cd lambda && npm install + - name: Run tests run: npm test