Fix CI action for Serene jest tests #1539
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Builds and test | |
name: build | |
on: | |
push: | |
branches: [ "master" ] | |
pull_request: | |
branches: [ "master" ] | |
workflow_dispatch: | |
jobs: | |
tests: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: setup .net | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: 8.0.x | |
- name: Nuget package cache | |
uses: actions/cache@v4 | |
id: nuget-package-cache | |
env: | |
cache-name: nuget-package-cache | |
with: | |
path: ~/.nuget/packages | |
key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.csproj') }} | |
restore-keys: | | |
${{ runner.os }}-nuget- | |
- name: setup node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '20' | |
- name: pnpm install | |
uses: ./.github/actions/pnpm-install | |
- name: sleekgrid tests | |
run: pnpm test | |
working-directory: "./packages/sleekgrid" | |
- name: corelib tests | |
run: pnpm test | |
working-directory: "./packages/corelib" | |
- name: pnpm install common-features | |
run: pnpm install --frozen-lockfile --prefer-offline | |
working-directory: "./common-features" | |
- name: pnpm build common-features | |
run: pnpm -r build | |
working-directory: "./common-features/src" | |
- name: npm install serene | |
run: npm install | |
working-directory: "./serene/src/Serene.Web" | |
- name: dotnet build Serenity.Net.CodeGenerator | |
run: dotnet build | |
working-directory: "./src/Serenity.Net.CodeGenerator" | |
- name: dotnet tool restore commmon-features | |
run: dotnet tool restore | |
working-directory: "./common-features/src" | |
- name: dotnet tool restore Serene | |
run: dotnet tool restore | |
working-directory: "./serene/src/Serene.Web" | |
- name: dotnet build Serenity.sln | |
run: dotnet build /p:SkipNodeScripts=true | |
- name: dotnet test | |
run: dotnet test --no-build --verbosity normal | |
- name: generate dynamic-data under test-utils | |
run: dotnet ../../serene/src/Serene.Web/bin/Debug/net8.0/Serene.Web.dll dynamic-data | |
working-directory: "./packages/test-utils" | |
- name: jest tests common-features | |
run: pnpm -r test | |
working-directory: "common-features" | |
- name: generate dynamic-data under Serene.Web | |
run: dotnet ./bin/Debug/net8.0/Serene.Web.dll dynamic-data | |
working-directory: "./serene/src/Serene.Web" | |
- name: jest tests Serene.Web | |
run: npm run test | |
working-directory: "./serene/src/Serene.Web" | |