Skip to content

Commit 6de0272

Browse files
authored
Use new angular project format in visual studio (#115)
* move angular project * more reorg * dockerfile fixup * workflow fixes * get back end test results * try a different folder * now report it * keep 2 comments * different wildcard * path fixes * these also * send the auth also * more
1 parent 09c3f22 commit 6de0272

496 files changed

Lines changed: 3831 additions & 3425 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.dockerignore

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,11 @@
2121
**/obj
2222
**/secrets.dev.yaml
2323
**/values.dev.yaml
24-
**/.angular
2524
**/config
2625
LICENSE
27-
README.md
26+
README.md
27+
!**/.gitignore
28+
!.git/HEAD
29+
!.git/config
30+
!.git/packed-refs
31+
!.git/refs/heads/**

.github/workflows/docker-publish.yml

Lines changed: 31 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
steps:
1616
- uses: actions/checkout@v2
1717
- name: Run build
18-
run: docker build . --file ./OpenAlprWebhookProcessor/Dockerfile
18+
run: docker build . --file ./OpenAlprWebhookProcessor.Server/Dockerfile
1919

2020
back-end-tests:
2121
runs-on: ubuntu-latest
@@ -37,7 +37,7 @@ jobs:
3737
- name: Test
3838
run: dotnet test --configuration Release --no-build --collect:"XPlat Code Coverage" --results-directory ./coverage
3939

40-
- name: Code Coverage Report
40+
- name: Back End Code Coverage Report
4141
uses: irongut/CodeCoverageSummary@v1.3.0
4242
with:
4343
filename: coverage/**/coverage.cobertura.xml
@@ -54,6 +54,7 @@ jobs:
5454
uses: marocchino/sticky-pull-request-comment@v2
5555
if: github.event_name == 'pull_request'
5656
with:
57+
header: Back End Coverage
5758
recreate: true
5859
path: code-coverage-results.md
5960

@@ -62,12 +63,33 @@ jobs:
6263
steps:
6364
- uses: actions/checkout@v2
6465
- name: Run frontend tests
65-
working-directory: ./OpenAlprWebhookProcessor/angularapp
66+
working-directory: ./openalprwebhookprocessor.client
6667
run: |
6768
npm ci
6869
npm run test:prod
6970
npm run lint
7071
72+
- name: Front End Code Coverage Report
73+
uses: irongut/CodeCoverageSummary@v1.3.0
74+
with:
75+
filename: ./openalprwebhookprocessor.client/coverage/cobertura-coverage.xml
76+
badge: true
77+
fail_below_min: true
78+
format: markdown
79+
hide_branch_rate: false
80+
hide_complexity: true
81+
indicators: true
82+
output: both
83+
thresholds: '0 80'
84+
85+
- name: Add Coverage PR Comment
86+
uses: marocchino/sticky-pull-request-comment@v2
87+
if: github.event_name == 'pull_request'
88+
with:
89+
header: Front End Coverage
90+
recreate: true
91+
path: code-coverage-results.md
92+
7193
windows-build-push:
7294
needs: build
7395
runs-on: ubuntu-latest
@@ -86,25 +108,16 @@ jobs:
86108
run: |
87109
tag=$(git describe --tags --abbrev=0)
88110
release_name="OpenAlprWebHookProcessor-${tag}-windows64"
89-
dotnet restore "OpenAlprWebhookProcessor/OpenAlprWebhookProcessor.csproj"
90-
dotnet build "OpenAlprWebhookProcessor/OpenAlprWebhookProcessor.csproj" -c Release
91-
dotnet publish "OpenAlprWebhookProcessor/OpenAlprWebhookProcessor.csproj" -c Release -o "$release_name"
111+
dotnet restore "OpenAlprWebhookProcessor.Server/OpenAlprWebhookProcessor.Server.csproj"
112+
dotnet build "OpenAlprWebhookProcessor.Server/OpenAlprWebhookProcessor.Server.csproj" -c Release
113+
dotnet publish "OpenAlprWebhookProcessor.Server/OpenAlprWebhookProcessor.Server.csproj" -c Release -o "$release_name"
92114
tar czvf "${release_name}.tar.gz" "$release_name"
93115
94116
- name: Publish
95117
uses: softprops/action-gh-release@v1
96-
if: contains(github.ref, 'alpha') != true
97118
with:
98119
files: "OpenAlprWebHookProcessor*"
99-
env:
100-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
101-
102-
- name: Publish
103-
uses: softprops/action-gh-release@v1
104-
if: contains(github.ref, 'alpha')
105-
with:
106-
files: "OpenAlprWebHookProcessor*"
107-
prerelease: true
120+
prerelease: ${{ contains(github.ref, 'alpha') }}
108121
env:
109122
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
110123

@@ -130,20 +143,10 @@ jobs:
130143
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
131144

132145
- name: Push to Docker Hub
133-
if: contains(github.ref, 'alpha') != true
134146
uses: docker/build-push-action@v2
135147
with:
136-
file: ./OpenAlprWebhookProcessor/Dockerfile
148+
file: ./OpenAlprWebhookProcessor.Server/Dockerfile
137149
push: true
138150
tags: |
139151
mlapaglia/openalprwebhookprocessor:${{ steps.get_version.outputs.VERSION }}
140-
mlapaglia/openalprwebhookprocessor:latest
141-
142-
- name: Push alpha build to Docker Hub
143-
if: contains(github.ref, 'alpha')
144-
uses: docker/build-push-action@v2
145-
with:
146-
file: ./OpenAlprWebhookProcessor/Dockerfile
147-
push: true
148-
tags: |
149-
mlapaglia/openalprwebhookprocessor:${{ steps.get_version.outputs.VERSION }}
152+
${{ contains(github.ref, 'alpha') && 'mlapaglia/openalprwebhookprocessor:alpha' || 'mlapaglia/openalprwebhookprocessor:latest' }}

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -356,4 +356,4 @@ dist/
356356
**/log*.txt
357357
*db-shm
358358
*db-wal
359-
OpenAlprWebhookProcessor/angularapp/.angular/*
359+
openalprwebhookprocessor.client/.angular/*
File renamed without changes.
File renamed without changes.
File renamed without changes.

OpenAlprWebhookProcessor/Alerts/AlertUpdateRequest.cs renamed to OpenAlprWebhookProcessor.Server/Alerts/AlertUpdateRequest.cs

File renamed without changes.

OpenAlprWebhookProcessor/Alerts/AlertsController.cs renamed to OpenAlprWebhookProcessor.Server/Alerts/AlertsController.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ namespace OpenAlprWebhookProcessor.Alerts
1010
{
1111
[Authorize]
1212
[ApiController]
13-
[Route("alerts")]
13+
[Route("api/alerts")]
1414
public class AlertsController : Controller
1515
{
1616
private readonly GetAlertsRequestHandler _getAlertsRequestHandler;

OpenAlprWebhookProcessor/Alerts/GetAlerts/GetAlertsRequestHandler.cs renamed to OpenAlprWebhookProcessor.Server/Alerts/GetAlerts/GetAlertsRequestHandler.cs

File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)