Skip to content

Commit

Permalink
new github action (could not test locally)
Browse files Browse the repository at this point in the history
  • Loading branch information
dgg committed Dec 30, 2023
1 parent d5f865d commit f403479
Showing 1 changed file with 63 additions and 22 deletions.
85 changes: 63 additions & 22 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,28 +1,69 @@
# This workflow will build a .NET project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net
name: nmoneys build

name: .NET

on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
on: [push]

jobs:
build:

runs-on: ubuntu-latest
runs-on: ubuntu-22.04
env:
VERBOSITY: q
CONFIGURATION: Release
DOTNET_NOLOGO: true
DOTNET_CLI_TELEMETRY_OPTOUT: true

steps:
- uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 6.0.x
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --no-restore
- name: Test
run: dotnet test --no-build --verbosity normal
- uses: actions/checkout@v3
- uses: actions/setup-dotnet@v3
with:
dotnet-version: 7.0.306
#- name: Info
# run: dotnet --info
- name: Restore
shell: pwsh
run: ./build.ps1 -task Restore -verbosity "${{ env.VERBOSITY }}" -configuration "${{ env.CONFIGURATION }}"
- name: Compile
shell: pwsh
run: ./build.ps1 -task Compile -verbosity "${{ env.VERBOSITY }}" -configuration "${{ env.CONFIGURATION }}"
- name: Test
shell: pwsh
run: ./build.ps1 -task Test -verbosity "${{ env.VERBOSITY }}" -configuration "${{ env.CONFIGURATION }}"
- name: Pack
shell: pwsh
run: ./build.ps1 -task Pack -verbosity "${{ env.VERBOSITY }}" -configuration "${{ env.CONFIGURATION }}"
- name: Copy-Artifacts
shell: pwsh
run: ./build.ps1 -task CopyArtifacts -verbosity "${{ env.VERBOSITY }}" -configuration "${{ env.CONFIGURATION }}"
#- name: Build-All
# shell: pwsh
# run: ./build.ps1
- name: Test Reporter
if: ${{ !env.ACT }}
uses: dorny/test-reporter@v1.6.0
with:
name: Test Report
path: "./release/TestResults/*.trx"
reporter: dotnet-trx
fail-on-error: true

- name: Upload trx
uses: actions/upload-artifact@v3
with:
name: tests-results
path: |
./release/TestResults/*.trx
./release/TestResults/*.xml
- name: Upload bin
uses: actions/upload-artifact@v3
with:
name: bin
path: |
./release/*.xml
./release/*.pdb
./release/*.dll
- name: Upload packages
uses: actions/upload-artifact@v3
with:
name: packages
path: ./release/*.nupkg

0 comments on commit f403479

Please sign in to comment.