Skip to content

Commit 361cff7

Browse files
committed
Add GitHub Actions workflow for building and running unit tests
1 parent 6a96330 commit 361cff7

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

.github/workflows/render.yaml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Build and Run Unit Tests
2+
3+
on:
4+
push:
5+
branches: [ "render-deployment" ]
6+
7+
jobs:
8+
build_unit_tests:
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- name: Checkout the repository
13+
uses: actions/checkout@v4
14+
- name: Setup .NET version 9
15+
uses: actions/setup-dotnet@v4
16+
with:
17+
dotnet-version: 9.0.x
18+
- name: Restore dependencies
19+
run: dotnet restore
20+
- name: Build
21+
run: dotnet build --no-restore
22+
- name: Execute NUnit Tests
23+
run: dotnet test --no-build --verbosity normal
24+
25+
deploy_to_render:
26+
needs: build_unit_tests
27+
runs-on: ubuntu-latest
28+
steps:
29+
- uses: actions/checkout@v3
30+
- uses: JorgeLNJunior/render-deploy@v1.4.4
31+
with:
32+
service_id: ${{ secrets.MY_RENDER_SERVICE_ID }}
33+
api_key: ${{ secrets.MY_RENDER_API_KEY }}

0 commit comments

Comments
 (0)