-
Notifications
You must be signed in to change notification settings - Fork 1
54 lines (50 loc) · 2.22 KB
/
build-and-test.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
54
name: Build and Test
on:
push:
branches: [ master, integration ]
pull_request:
branches: [ master, integration ]
jobs:
build:
timeout-minutes: 10
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup .NET Core
uses: actions/setup-dotnet@v4
with:
dotnet-version: 7
- name: Install dependencies
run: dotnet restore
- name: Build
run: dotnet build --configuration Debug --no-restore
- name: Unit Test
run: dotnet test --no-restore --verbosity normal /p:Exclude="[*.Test]*" /p:CollectCoverage=true /p:CoverletOutputFormat=opencover /p:CoverletOutput=TestResults/ --filter ExtractorUtils.Test.Unit. ./ExtractorUtils.Test/
if: ${{ github.event == 'pull_request' && github.base_ref == 'refs/heads/integration' }}
- name: Start Redis
uses: supercharge/redis-github-action@ea9b21c6ecece47bd99595c532e481390ea0f044 # 1.8.0
with:
redis-version: 5
- name: Test
run: dotnet test --no-restore --verbosity normal /p:Exclude="[*.Test]*" /p:CollectCoverage=true /p:CoverletOutputFormat=opencover /p:CoverletOutput=TestResults/ ./ExtractorUtils.Test/
if: ${{ github.event != 'pull_request' || github.base_ref == 'refs/heads/master' }}
env:
TEST_PROJECT: "extractor-tests"
TEST_HOST: "https://greenfield.cognitedata.com"
TEST_SCOPE: "https://greenfield.cognitedata.com/.default"
TEST_CLIENT_ID: ${{ secrets.BF_TEST_CLIENT_ID }}
TEST_TENANT: ${{ secrets.BF_TEST_TENANT }}
TEST_SECRET: ${{ secrets.BF_TEST_SECRET }}
BF_TEST_PROJECT: "extractor-bluefield-testing"
BF_TEST_HOST: "https://bluefield.cognitedata.com"
BF_TEST_SCOPE: "https://bluefield.cognitedata.com/.default"
BF_TEST_CLIENT_ID: ${{ secrets.BF_TEST_CLIENT_ID }}
BF_TEST_TENANT: ${{ secrets.BF_TEST_TENANT }}
BF_TEST_SECRET: ${{ secrets.BF_TEST_SECRET }}
KEYVAULT_CLIENT_ID: ${{ secrets.KEYVAULT_CLIENT_ID }}
KEYVAULT_CLIENT_SECRET: ${{ secrets.KEYVAULT_CLIENT_SECRET }}
KEYVAULT_TENANT_ID: ${{ secrets.KEYVAULT_TENANT_ID }}
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}