From 6d7324a83b985c18ce5a6ae43fe73fd52d8fbf71 Mon Sep 17 00:00:00 2001 From: Kyle McMaster Date: Tue, 1 Jul 2025 18:19:44 -0400 Subject: [PATCH 1/5] Create build.yml --- .github/workflows/build.yml | 50 +++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..a9afc2f --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,50 @@ +# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs +# This workflow will build a .NET project +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net + +name: CI + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +jobs: + build-npm: + + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [18.x, 20.x, 22.x] + # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ + + steps: + - uses: actions/checkout@v4 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node-version }} + cache: 'npm' + - run: npm ci + - run: npm run build --if-present + - run: npm test + + build-dotnet: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - name: Setup .NET + uses: actions/setup-dotnet@v4 + with: + dotnet-version: 8.0.x + - name: Restore dependencies + run: dotnet restore + - name: Build + run: dotnet build --no-restore + - name: Test + run: dotnet test --no-build --verbosity normal From 4039e7c1531bcbad02c4adbca31facea3aab2414 Mon Sep 17 00:00:00 2001 From: Kyle McMaster Date: Tue, 1 Jul 2025 18:24:18 -0400 Subject: [PATCH 2/5] Update build.yml --- .github/workflows/build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a9afc2f..c809464 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -28,6 +28,7 @@ jobs: with: node-version: ${{ matrix.node-version }} cache: 'npm' + - run: cd src/Microsoft.eShopWeb.Web - run: npm ci - run: npm run build --if-present - run: npm test From 3455e8899f4e874bd2ccbf23c78dd9cd7cb8d201 Mon Sep 17 00:00:00 2001 From: Kyle McMaster Date: Tue, 1 Jul 2025 18:27:24 -0400 Subject: [PATCH 3/5] Update build.yml --- .github/workflows/build.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c809464..21d28c8 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -28,10 +28,11 @@ jobs: with: node-version: ${{ matrix.node-version }} cache: 'npm' - - run: cd src/Microsoft.eShopWeb.Web - - run: npm ci - - run: npm run build --if-present - - run: npm test + - run: | + cd src/Microsoft.eShopWeb.Web + npm ci + npm run build --if-present + npm test build-dotnet: From e0c300bafb3a67e6ec3c97eaae675d47cb54a8e2 Mon Sep 17 00:00:00 2001 From: Kyle McMaster Date: Tue, 1 Jul 2025 18:30:50 -0400 Subject: [PATCH 4/5] Update build.yml --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 21d28c8..2e515be 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -27,7 +27,7 @@ jobs: uses: actions/setup-node@v4 with: node-version: ${{ matrix.node-version }} - cache: 'npm' +# cache: 'npm' - run: | cd src/Microsoft.eShopWeb.Web npm ci From 3d82c1bd972b2ee6dd3f0939593b4a27f724c358 Mon Sep 17 00:00:00 2001 From: Kyle McMaster Date: Tue, 1 Jul 2025 18:32:04 -0400 Subject: [PATCH 5/5] Update build.yml --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2e515be..88849f8 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -32,7 +32,7 @@ jobs: cd src/Microsoft.eShopWeb.Web npm ci npm run build --if-present - npm test + npm test --if-present build-dotnet: