-
Notifications
You must be signed in to change notification settings - Fork 0
75 lines (63 loc) · 1.83 KB
/
Copy pathci.yml
File metadata and controls
75 lines (63 loc) · 1.83 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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
name: CI
on:
push:
branches: [master]
pull_request:
branches: [master]
workflow_dispatch:
inputs:
module:
description: 'Module being validated, for example Workbooks and Views'
required: false
type: string
jobs:
build-and-test:
name: Build & Test
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.x'
- name: Module gate context
if: ${{ github.event_name == 'workflow_dispatch' && inputs.module != '' }}
run: echo "Validating module gate for ${{ inputs.module }}"
- name: Restore
run: dotnet restore TableauSharp.sln
- name: Build
run: dotnet build TableauSharp.sln --no-restore -c Release
- name: Test
run: >
dotnet test TableauSharp.sln
--no-build
-c Release
--verbosity normal
--logger "trx;LogFileName=test-results.trx"
--collect:"XPlat Code Coverage"
- name: Pack
run: >
dotnet pack src/TableauSharp/TableauSharp.csproj
--no-build
-c Release
-p:ContinuousIntegrationBuild=true
-p:PackageVersion=0.0.0-ci.${{ github.run_number }}
-o ./artifacts
- name: Upload test results
if: always()
uses: actions/upload-artifact@v4
with:
name: test-results
path: '**/TestResults/**'
- name: Upload coverage
if: always()
uses: actions/upload-artifact@v4
with:
name: coverage
path: '**/TestResults/**/coverage.cobertura.xml'
- name: Upload packages
uses: actions/upload-artifact@v4
with:
name: nuget-packages
path: ./artifacts/