mirror of
https://github.com/IeuanWalker/GeoUK.git
synced 2025-10-25 15:19:15 +00:00
Create pr.yml (#47)
* Create dotnet.yml * Replace dotnet.yml with pr.yml for GitHub Actions Updated the workflow to build and test a .NET project on pull requests to the master branch. Removed the old `dotnet.yml` file and added a new `pr.yml` file with necessary steps for setup, restore, build, and test. Updated the Visual Studio version in `GeoUK.OSTN.sln` from 16 to 17 and added a "Solution Items" section to include the new `pr.yml` file in the project structure. * Update workflow name in pr.yml Changed the workflow name from `.NET` to `PullRequest` for better clarity and to indicate its purpose in handling pull requests. * Update build command to use Release configuration Modified the `dotnet build` command to include the `--configuration Release` option. This change ensures that the build process targets the Release mode instead of the default Debug mode, enhancing the overall build process. * Update build and test commands in pr.yml Added `--configuration Release` to `dotnet build` and `dotnet test` commands to ensure optimized performance for production environments. The `--no-restore` and `--no-build` options remain unchanged.
This commit is contained in:
23
.github/workflows/pr.yml
vendored
Normal file
23
.github/workflows/pr.yml
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
name: PullRequest
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches: [ "master" ]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Setup .NET
|
||||
uses: actions/setup-dotnet@v4
|
||||
with:
|
||||
dotnet-version: 9.0.x
|
||||
- name: Restore dependencies
|
||||
run: dotnet restore
|
||||
- name: Build
|
||||
run: dotnet build --configuration Release --no-restore
|
||||
- name: Test
|
||||
run: dotnet test --configuration Release --no-build --verbosity normal
|
||||
Reference in New Issue
Block a user