Skip to content

Commit

Permalink
oops
Browse files Browse the repository at this point in the history
  • Loading branch information
archanox committed Jan 1, 2024
1 parent db683a4 commit fe0208e
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 48 deletions.
7 changes: 1 addition & 6 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,17 @@
name: Documentation

on:
push:
branches:
- main
- master
permissions:
actions: read
pages: write
id-token: write
env:
dotnet-version: 8.0.x

concurrency:
group: "pages"
cancel-in-progress: false

jobs:
deploy-docs:
name: Deploy Docs
Expand All @@ -33,10 +30,8 @@ jobs:
run: dotnet restore
- name: Build
run: dotnet build --no-restore

- run: dotnet tool update -g docfx
- run: docfx docfx.json

- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
Expand Down
57 changes: 28 additions & 29 deletions .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
name: Build & Test

on:
push:
branches:
- main
- master
env:
dotnet-version: 8.0.x

jobs:
build:
runs-on: ubuntu-latest
Expand All @@ -20,34 +18,35 @@ jobs:
run: dotnet restore
- name: Build
run: dotnet build --no-restore -c Release

test:
name: Run Tests
needs: [build]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ env.dotnet-version }}
- name: Test with dotnet
run: dotnet test --logger trx --results-directory "TestResults-${{ env.dotnet-version }}"
- name: Upload dotnet test results
uses: actions/upload-artifact@v4
with:
name: dotnet-results-${{ env.dotnet-version }}
path: TestResults-${{ env.dotnet-version }}
# Use always() to always run this step to publish test results when there are test failures
if: ${{ always() }}
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
- name: altcover
run: dotnet test /p:AltCover=true /p:AltCoverAssemblyFilter="testhost|Microsoft"
- name: Run codacy-coverage-reporter
uses: codacy/codacy-coverage-reporter-action@v1
with:
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
coverage-reports: "KartaViewSharp.Tests/coverage.net8.0.xml"
if: ${{ always() }}
- uses: actions/checkout@v4
- uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ env.dotnet-version }}
- name: Test with dotnet
run: dotnet test --logger trx --results-directory "TestResults-${{ env.dotnet-version }}"
- name: Upload dotnet test results
uses: actions/upload-artifact@v4
with:
name: dotnet-results-${{ env.dotnet-version }}
path: TestResults-${{ env.dotnet-version }}
# Use always() to always run this step to publish test results when there are test failures
if: ${{ always() }}
- name: altcover
run: dotnet test /p:AltCover=true /p:AltCoverAssemblyFilter="testhost|Microsoft"
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: "KartaViewSharp.Tests/coverage.net8.0.xml"
if: ${{ always() }}
- name: Run codacy-coverage-reporter
uses: codacy/codacy-coverage-reporter-action@v1
with:
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
coverage-reports: "KartaViewSharp.Tests/coverage.net8.0.xml"
if: ${{ always() }}
24 changes: 11 additions & 13 deletions .github/workflows/nuget.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,22 @@
name: Upload dotnet package

on:
release:
types: [created]

jobs:
deploy:
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
steps:
- uses: actions/checkout@v4
- uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.x'
- run: dotnet build --configuration Release KartaViewSharp
- name: Create the package
run: dotnet pack --configuration Release KartaViewSharp
- name: Publish the package to nuget
run: dotnet nuget push KartaViewSharp/bin/Release/*.nupkg -k $NUGET_AUTH_TOKEN -s https://api.nuget.org/v3/index.json
env:
NUGET_AUTH_TOKEN: ${{secrets.NUGET_API_KEY}}
- uses: actions/checkout@v4
- uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.x'
- run: dotnet build --configuration Release KartaViewSharp
- name: Create the package
run: dotnet pack --configuration Release KartaViewSharp
- name: Publish the package to nuget
run: dotnet nuget push KartaViewSharp/bin/Release/*.nupkg -k $NUGET_AUTH_TOKEN -s https://api.nuget.org/v3/index.json
env:
NUGET_AUTH_TOKEN: ${{secrets.NUGET_API_KEY}}

0 comments on commit fe0208e

Please sign in to comment.