-
Notifications
You must be signed in to change notification settings - Fork 157
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add github action pr builds for building project, and running t…
…ests on linux and windows (#204) * feat: add github action pr builds for building project, and running tests on linux and windows * feat: update and ensure linux ci cd test build only run on dotnet 7 framework only * feat: add sensible timeouts for github action builds and add automatic upgrades for github actions * feat: use a safe implementation of falling back to char separator for PhoneNumberOfflineGeocoder.cs
- Loading branch information
Showing
4 changed files
with
75 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
name: build_and_run_unit_tests_linux | ||
|
||
on: | ||
push: | ||
branches: [ "main" ] | ||
pull_request: | ||
branches: [ "main" ] | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build_and_run_unit_tests_linux: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 20 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Setup .NET | ||
uses: actions/setup-dotnet@v3 | ||
with: | ||
dotnet-version: 8.x | ||
- name: Add zip files required for running tests | ||
run: | | ||
(cd resources/geocoding; zip -r ../../resources/geocoding.zip *) | ||
(cd resources/test/geocoding; zip -r ../../../resources/test/testgeocoding.zip *) | ||
- name: Restore dependencies | ||
run: dotnet restore | ||
working-directory: ./csharp | ||
- name: Build solution | ||
run: dotnet build --no-restore | ||
working-directory: ./csharp | ||
- name: Test solution targeting dotnet7.0 only | ||
run: dotnet test --no-build --verbosity normal -p:TargetFrameworks=net7.0 | ||
working-directory: ./csharp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
name: build_and_run_unit_tests_windows | ||
|
||
on: | ||
push: | ||
branches: [ "main" ] | ||
pull_request: | ||
branches: [ "main" ] | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build_and_run_unit_tests_windows: | ||
runs-on: windows-latest | ||
timeout-minutes: 20 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Setup .NET | ||
uses: actions/setup-dotnet@v3 | ||
with: | ||
dotnet-version: 8.x | ||
- name: Add zip files required for running tests | ||
run: | | ||
Compress-Archive -Path "resources\geocoding\*" -DestinationPath "resources\geocoding.zip" | ||
Compress-Archive -Path "resources\test\geocoding\*" -DestinationPath "resources\test\testgeocoding.zip" | ||
- name: Restore dependencies | ||
run: dotnet restore | ||
working-directory: ./csharp | ||
- name: Build solution | ||
run: dotnet build --no-restore | ||
working-directory: ./csharp | ||
- name: Test solution | ||
run: dotnet test --no-build --verbosity normal | ||
working-directory: ./csharp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters