-
-
Notifications
You must be signed in to change notification settings - Fork 75
95 lines (89 loc) · 4.16 KB
/
Copy pathintegrate.yml
File metadata and controls
95 lines (89 loc) · 4.16 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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
name: Build & Test
on:
push:
branches: [ master ]
paths-ignore:
- '**/*.md'
- '.github/ISSUE_TEMPLATE/**'
- '.github/FUNDING.yml'
- 'LICENSE'
- '.claude/**'
permissions:
contents: read
id-token: write # Required for OIDC
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
- name: Setup .NET 10.0
uses: actions/setup-dotnet@a98b56852c35b8e3190ac28c8c2271da59106c68 # v6.0.0
with:
dotnet-version: '10.0.x'
- name: Set Cobalt packages token
run: echo "COBALT_PACKAGES_TOKEN=${{ secrets.COBALT_PACKAGES_TOKEN }}" >> $GITHUB_ENV
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --no-restore /p:ContinuousIntegrationBuild=true
- name: Install Playwright browsers (for sample-app smoke tests)
run: pwsh artifacts/bin/WopiHost.SmokeTests/debug/playwright.ps1 install --with-deps chromium
- name: Test
# Emit JUnit XML alongside lcov coverage so Codecov Test Analytics can ingest run
# times / failures. {assembly} keeps each test project's results in a distinct file.
run: dotnet test --no-build --verbosity normal /p:CollectCoverage=true /p:CoverletOutputFormat=lcov --logger "junit;LogFilePath={assembly}.junit.xml" --results-directory ${{ github.workspace }}/test-results
- name: Upload test results to Codecov
# Runs even when the Test step failed — reporting the failed tests is the whole point.
if: ${{ !cancelled() }}
uses: codecov/test-results-action@0fa95f0e1eeaafde2c782583b36b28ad0d8c77d3 # v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ${{ github.workspace }}/test-results/*.junit.xml
- name: Upload coverage to Qlty
uses: qltysh/qlty-action/coverage@08a0a862c159eae9b9003081da6663d96efef637 # v2
with:
oidc: true
# Coverlet's MSBuild integration emits `coverage.info` per project at
# `test/<Project>/coverage.info`. Root the glob explicitly under `test/` so
# qlty-action's @actions/glob layer has an anchored starting directory.
files: "test/**/coverage.info"
# Coverlet's lcov references source-generated files (LoggerMessage.g.cs,
# LibraryImports.g.cs, etc.) under artifacts/obj/, which don't exist at
# publish time. Without this flag Qlty counts them as 0% covered. See also
# .qlty/qlty.toml.
skip-missing-files: true
- name: Codecov
uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7
with:
token: ${{ secrets.CODECOV_TOKEN }}
- name: FOSSA scan + policy gate
uses: fossa-contrib/fossa-action@d28f0c947e7406706981a62a91ecc009bcc39fd7 # v4
with:
fossa-api-key: ${{ secrets.FOSSA_API_KEY }}
skip-test: false
filesystem-owner-cross-platform:
# The `build` job above only runs on Linux, so the Windows (ACL) and macOS (stat)
# branches of WopiFile.Owner — and the arch-dependent macOS `stat`/`stat$INODE64`
# symbol selection — would otherwise never be exercised. This job runs the
# dependency-free FileSystemProvider tests on the other OSes/architectures.
name: FS owner lookup (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
# windows-latest: ACL owner path.
# macos-latest: Apple Silicon (arm64) -> plain `stat` symbol.
os: [windows-latest, macos-latest]
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
- name: Setup .NET 10.0
uses: actions/setup-dotnet@a98b56852c35b8e3190ac28c8c2271da59106c68 # v6.0.0
with:
dotnet-version: '10.0.x'
- name: Set Cobalt packages token
# Not needed by this test project (package-source mapping keeps the private feed
# scoped to Microsoft.CobaltCore), but set it so any incidental restore stays quiet.
shell: bash
run: echo "COBALT_PACKAGES_TOKEN=${{ secrets.COBALT_PACKAGES_TOKEN }}" >> $GITHUB_ENV
- name: Test (FileSystemProvider — exercises Owner lookup)
run: dotnet test test/WopiHost.FileSystemProvider.Tests --verbosity normal