name: Continupus Integration and Continupus  Delpoy

on:
  push:
    branches:
      - main

jobs:
  build: 
  
    runs-on: ubuntu-latest
    steps:
      - name: Checkout code
        uses: actions/checkout@v2

      - name: Setup .Net 5
        uses: actions/setup-dotnet@v1
        with:
          dotnet-version: '5.0.x'

      - name: Restore dependencies
        run: dotnet restore ./src/Web/RecipeBook.Web/RecipeBook.Web.csproj

      - name: npm install
        uses: jaid/action-npm-install@v1.2.1

      - name: npm jquery install
        run: npm i --save-dev @types/jquery

      # - name: npm cropperjs install
      #   run: npm install cropperjs      

      - name: npm jqueryui install
        run: npm i --save-dev @types/jqueryui@1.12.13

      - name: npm cropperjs install
        run: npm install cropperjs

      - name: move cropperjs
        run: cp -R /home/runner/work/RecipeBook/RecipeBook/node_modules/cropperjs /home/runner/work/RecipeBook/RecipeBook/node_modules/@types/cropperjs

      - name: Build app
        run: dotnet build ./src/Web/RecipeBook.Web/RecipeBook.Web.csproj -c Release --no-restore

      - name: Automated tests
        run: dotnet test ./src/Tests/RecipeBook.Services.Data.Tests
name: Continupus Integration and Continupus  Delpoy

on:
  push:
    branches:
      - main

jobs:
  build: 
  
    runs-on: ubuntu-latest
    steps:
      - name: Checkout code
        uses: actions/checkout@v2

      - name: Setup .Net 5
        uses: actions/setup-dotnet@v1
        with:
          dotnet-version: '5.0.x'

      - name: Restore dependencies
        run: dotnet restore ./src/Web/RecipeBook.Web/RecipeBook.Web.csproj

      - name: npm install
        uses: jaid/action-npm-install@v1.2.1

      - name: npm jquery install
        run: npm i --save-dev @types/jquery

      # - name: npm cropperjs install
      #   run: npm install cropperjs      

      - name: npm jqueryui install
        run: npm i --save-dev @types/jqueryui@1.12.13

      - name: npm cropperjs install
        run: npm install cropperjs

      - name: move cropperjs
        run: cp -R /home/runner/work/RecipeBook/RecipeBook/node_modules/cropperjs /home/runner/work/RecipeBook/RecipeBook/node_modules/@types/cropperjs

      - name: Build app
        run: dotnet build ./src/Web/RecipeBook.Web/RecipeBook.Web.csproj -c Release --no-restore

      - name: Automated tests
        run: dotnet test ./src/Tests/RecipeBook.Services.Data.Tests/RecipeBook.Servies.Data.Tests.csproj -c Release --no-build
Add configuration to test job
Add configuration to test job
