Skip to content

chore(CI): prepare JEST CI verification job integration in G-A for client SPA app #130

chore(CI): prepare JEST CI verification job integration in G-A for client SPA app

chore(CI): prepare JEST CI verification job integration in G-A for client SPA app #130

name: EcommerceDDD
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: 8.0.x
- name: Restore dependencies
run: dotnet restore EcommerceDDD.sln
- name: Build
run: dotnet build --no-restore EcommerceDDD.sln
- name: Test
run: dotnet test --no-build --verbosity normal EcommerceDDD.sln
setup-node:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Node.js runtime
uses: actions/setup-node@v4
with:
node-version: 18
- name: Cache Node.js install
uses: actions/cache@v3
with:
path: src/EcommerceDDD.Spa/node_modules
key: ${{ runner.os }}-node-${{ hashFiles('src/EcommerceDDD.Spa/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install deps
run: npm ci # Better than npm i, ref: https://docs.npmjs.com/cli/v10/commands/npm-ci
working-directory: src/EcommerceDDD.Spa
spa-test-and-verify:
runs-on: ubuntu-latest
needs: setup-node
steps:
- name: Run Jest suits
run: npm run test
working-directory: EcommerceDDD.Spa