Skip to content

Commit b96778d

Browse files
authored
Actually practice continuous integration (#78)
Now we actually have tests!
1 parent e9ab878 commit b96778d

365 files changed

Lines changed: 2035 additions & 864 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.

.github/instructions/csharp.instructions.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
applyTo: '**/*.cs'
33
---
44

5-
1. ALWAYS wrap blocks with braces `{}` even for single-line statements.
5+
1. ALWAYS wrap blocks with braces `{}` even for single-line statements!!
66
1. ALWAYS use the filesystem to determine namespace names.
77
1. PREFER to use records for classes with properties and no methods.
8-
1. AVOID using regions (`#region` / `#endregion`).
8+
1. NEVER use regions (`#region` / `#endregion`).
99
1. AVOID writing docstrings for small methods that are self-explanatory.
1010
1. AVOID adding unnecessary empty lines.
1111
1. When Nuget packages are modified, the docker containers must be rebuilt.

.github/instructions/frontend.instructions.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@ applyTo: '**/client-app/**'
33
---
44

55
1. PREFER send server data as JSON instead of forms.
6-
1. PREFER writing functional React components using hooks.
6+
1. PREFER writing functional React components using hooks.
7+
1. Use Autosuggest NPM library for input fields with suggestions.

.github/workflows/main_kooktime.yml

Lines changed: 22 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Docs for the Azure Web Apps Deploy action: https://go.microsoft.com/fwlink/?linkid=2134798
22
# More GitHub Actions for Azure: https://go.microsoft.com/fwlink/?linkid=2135048
33

4-
name: Azure App Service - kooktime(Production), Build and deploy DotnetCore app
4+
name: CI/CD
55

66
on:
77
push:
@@ -12,11 +12,30 @@ on:
1212
- main
1313

1414
jobs:
15-
build-and-deploy:
15+
test:
1616
runs-on: ubuntu-latest
1717

1818
steps:
19-
# checkout the repo
19+
- name: "Checkout Github Action"
20+
uses: actions/checkout@master
21+
22+
- name: Set up .NET Core
23+
uses: actions/setup-dotnet@v1
24+
with:
25+
dotnet-version: "10.0.x"
26+
27+
- name: Server
28+
run: scripts/server
29+
30+
- name: Test
31+
run: scripts/test
32+
33+
deploy:
34+
runs-on: ubuntu-latest
35+
needs: test
36+
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
37+
38+
steps:
2039
- name: "Checkout Github Action"
2140
uses: actions/checkout@master
2241

@@ -28,15 +47,10 @@ jobs:
2847
- name: Build
2948
run: scripts/build
3049

31-
# - name: Test
32-
# run: scripts/test
33-
3450
- name: Publish
35-
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
3651
run: scripts/publish ${{env.DOTNET_ROOT}}/myapp
3752

3853
- name: Run Azure webapp deploy action using publish profile credentials
39-
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
4054
uses: azure/webapps-deploy@v2
4155
with:
4256
app-name: kooktime

.vscode/launch.json

Lines changed: 0 additions & 51 deletions
This file was deleted.

.vscode/react.code-snippets

Lines changed: 0 additions & 46 deletions
This file was deleted.

.vscode/settings.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
{
2-
"dotnet.defaultSolution": "babe-algorithms.sln",
3-
"cmake.configureOnOpen": false
2+
"dotnet.defaultSolution": "src/CookTime.sln",
43
}

.vscode/tasks.json

Lines changed: 0 additions & 50 deletions
This file was deleted.

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1010
### Added
1111

1212
- User custom lists feature: users can now create, manage, and delete their own named recipe lists
13+
- Tests!
1314

1415
### Changed
1516

1617
- Made authentication cookie persist for longer, helps mobile Safari
18+
- Reorganized the source code so it's all under `src`

Directory.Build.props

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<Project>
2+
<PropertyGroup>
3+
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
4+
</PropertyGroup>
5+
</Project>

0 commit comments

Comments
 (0)