Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update GitHub Actions #43

Merged
merged 1 commit into from
Apr 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 52 additions & 0 deletions .github/workflows/build-test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Build and test

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


env:
working-directory: Sources
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
DOTNET_NOLOGO: true
dotnet-version: 8.0.x

jobs:
build:
runs-on: ubuntu-latest

steps:
- run: git config --global core.autocrlf input
- uses: actions/checkout@v3

- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: ${{ env.dotnet-version }}

- name: Restore dependencies
run: dotnet restore
working-directory: ${{ env.working-directory }}

- name: Build
run: dotnet build -c Release --no-restore --verbosity normal
working-directory: ${{ env.working-directory }}

- name: Test
run: dotnet test -c Release --no-build --verbosity normal /p:CollectCoverage=true /p:CoverletOutputFormat=opencover
working-directory: ${{ env.working-directory }}

- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

# - name: Run mutation tests
# run: |
# dotnet tool restore
# dotnet stryker --reporter dashboard
# working-directory: ${{ env.working-directory }}
# env:
# STRYKER_DASHBOARD_API_KEY: ${{ secrets.STRYKER_DASHBOARD_API_KEY }}
39 changes: 0 additions & 39 deletions .github/workflows/build-test.yml

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,8 @@ jobs:
build:
runs-on: ubuntu-latest

defaults:
run:
working-directory: ${{ env.working-directory }}

steps:
- run: git config --global core.autocrlf input
- uses: actions/checkout@v3

- name: Setup .NET
Expand All @@ -27,15 +24,24 @@ jobs:

- name: Restore dependencies
run: dotnet restore
working-directory: ${{ env.working-directory }}

- name: Build
run: dotnet build -c Release /p:ContinuousIntegrationBuild=true --no-restore --verbosity normal
working-directory: ${{ env.working-directory }}

- name: Test
run: dotnet test -c Release --no-build --verbosity normal
working-directory: ${{ env.working-directory }}

- name: Pack
run: dotnet pack --no-build
working-directory: ${{ env.working-directory }}

- name: Publish to Nuget
run: dotnet nuget push ${{ env.release-directory }}/*.nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json --skip-duplicate
working-directory: ${{ env.working-directory }}

- name: Publish to Nuget symbols
run: dotnet nuget push ${{ env.release-directory }}/*.snupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json --skip-duplicate
run: dotnet nuget push ${{ env.release-directory }}/*.snupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json --skip-duplicate
working-directory: ${{ env.working-directory }}
Loading