-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (53 loc) · 1.55 KB
/
pull_request.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
name: Pull Request
on:
workflow_dispatch:
pull_request:
paths-ignore:
- "**/.gitignore"
- "**/.editorconfig"
- .github/**
- .vscode/**
branches:
- main
jobs:
format:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup .NET 8
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.x
- name: Restore dependencies
run: dotnet restore
- name: Format code
run: dotnet format --verify-no-changes --verbosity diagnostic
test:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup .NET 8
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.x
- name: Install report generator
run: dotnet tool install --global dotnet-reportgenerator-globaltool --version 5.3.7
- name: Restore dependencies
run: dotnet restore
- name: Run tests
env:
SKIP_EXAMPLES: true
AnthropicApiKey: ${{ secrets.ANTHROPIC_KEY }}
run: dotnet test
- name: Upload html coverage report
uses: actions/upload-artifact@v4
with:
name: html-report
path: tests/AnthropicClient.Tests/TestResults/coverage/report/
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4.0.1
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: tests/AnthropicClient.Tests/TestResults/coverage/coverage.cobertura.xml