Skip to content

Commit

Permalink
workflow optimizations
Browse files Browse the repository at this point in the history
  • Loading branch information
devkeydet authored Nov 15, 2022
1 parent 71cf884 commit 49399ca
Showing 1 changed file with 31 additions and 17 deletions.
48 changes: 31 additions & 17 deletions .github/workflows/pr-loop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,26 +3,40 @@ run-name: pr loop for solution using dotnet build on cdsproj

on:
pull_request:
branches: [ "main" ]
branches: ["main"]

jobs:
build:

runs-on: windows-latest

steps:
- uses: actions/checkout@v3
- name: npm install for pcf
run: |
cd pcf/LinearInputControl
npm install
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 7.0.x
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --no-restore --configuration release
- name: Test
run: dotnet test --no-build --verbosity normal
- uses: actions/checkout@v3

- name: setup-node
uses: actions/setup-node@v3
with:
node-version: 16
cache: "npm"
cache-dependency-path: pcf/LinearInputControl/package-lock.json

- name: cache-nuget
uses: actions/cache@v3
with:
path: ~/.nuget/packages
key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }}
restore-keys: |
${{ runner.os }}-nuget-
- name: npm install for pcf
run: |
cd pcf/LinearInputControl
npm install
- name: Restore dependencies
run: dotnet restore

- name: Build
run: dotnet build --no-restore --configuration release

- name: Test
run: dotnet test --no-build --verbosity normal

0 comments on commit 49399ca

Please sign in to comment.