Skip to content

Commit

Permalink
Create code-pr-check.yml (#134)
Browse files Browse the repository at this point in the history
* Create code-pr-check.yml

* Removed home controller tests

* Fixed broken test

---------

Co-authored-by: Tom Whittington <tom.whittington@education.gov.uk>
  • Loading branch information
ThomasWhittington and Tom Whittington authored Aug 16, 2024
1 parent 50f5740 commit aef7257
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 88 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/code-pr-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Code PR Check

on:
push:
branches: ["main", "Development"]
paths:
- "src/**"
- "tests/**"
pull_request:
branches: ["main", "Development"]
paths:
- "src/**"
- "tests/**"
- ".github/workflows/code-pr-check.yml"

concurrency:
group: "${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}"
cancel-in-progress: true

env:
DOTNET_VERSION: '8.0.x'

jobs:
build-test-web-app:
name: Build and run unit tests
runs-on: ubuntu-22.04

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

- name: Install dotnet coverage
run: dotnet tool install --global dotnet-coverage --version 17.9.3

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,9 @@ public class CustomAttachmentTests
{
Size = Size
}
}
},
SystemProperties =new SystemProperties()

}
}
}
Expand Down

0 comments on commit aef7257

Please sign in to comment.