-
Notifications
You must be signed in to change notification settings - Fork 33
58 lines (48 loc) · 2.04 KB
/
dotnet-tests.yml
File metadata and controls
58 lines (48 loc) · 2.04 KB
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
54
55
56
57
58
name: .NET Tests PR Check
on:
pull_request:
branches:
- main
- master
- '*'
jobs:
unit-e2e-tests:
runs-on: ubuntu-latest
env:
TEST_MODE: replay
GOOGLE_API_KEY: test-key
GOOGLE_CLOUD_PROJECT: test-project
GOOGLE_CLOUD_LOCATION: us-central1
steps:
- name: Checkout code
uses: actions/checkout@v5
- name: Setup .NET
uses: actions/setup-dotnet@v5
with:
dotnet-version: |
8.0.x
- name: List Recordings folder location
run: |
echo "Searching for Recordings folder..."
find $GITHUB_WORKSPACE -type d -name 'Recordings'
- name: Fake Google ADC
run: |
gcloud_config_path="${HOME}/.config/gcloud"
mkdir -p "${gcloud_config_path}"
cat > "${gcloud_config_path}/application_default_credentials.json" <<EOF
{ "client_id": "none", "client_secret": "none", "refresh_token": "none", "type": "authorized_user" }
EOF
- name: Show .NET version
run: dotnet --list-sdks
- name: Run Unit Tests against net8.0 build
if: github.repository == 'googleapis/dotnet-genai' || github.repository == 'google-gemini/private-dotnet-genai'
run: dotnet test ./Google.GenAI.Tests/Google.GenAI.Tests.csproj
- name: Run Unit Tests against netstandard2.0 build
if: github.repository == 'googleapis/dotnet-genai' || github.repository == 'google-gemini/private-dotnet-genai'
run: dotnet test ./Google.GenAI.Tests/Netstandard2_0Tests/Google.GenAI.Netstandard2_0.Tests.csproj
- name: Run E2E Tests against net8.0 build
if: github.repository == 'googleapis/dotnet-genai' || github.repository == 'google-gemini/private-dotnet-genai'
run: dotnet test ./Google.GenAI.E2E.Tests/Google.GenAI.E2E.Tests.csproj
- name: Run E2E Tests against netstandard2.0 build
if: github.repository == 'googleapis/dotnet-genai' || github.repository == 'google-gemini/private-dotnet-genai'
run: dotnet test ./Google.GenAI.E2E.Tests/Netstandard2_0Tests/Google.GenAI.E2E.Netstandard2_0Tests.csproj