-
Notifications
You must be signed in to change notification settings - Fork 0
71 lines (60 loc) · 2.59 KB
/
Copy pathci.yml
File metadata and controls
71 lines (60 loc) · 2.59 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
name: CI
on:
push:
branches: [master]
pull_request:
branches: [master]
permissions:
contents: read
# Cancel superseded runs for the same ref to save CI minutes.
concurrency:
group: ci-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
name: build · test · format
runs-on: ubuntu-latest
env:
DOTNET_NOLOGO: true
DOTNET_CLI_TELEMETRY_OPTOUT: true
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
NUGET_PACKAGES: ${{ github.workspace }}/.nuget/packages
steps:
- uses: actions/checkout@v7
- name: Setup .NET (8 + 9)
uses: actions/setup-dotnet@v6
with:
dotnet-version: |
8.0.x
9.0.x
- name: Cache NuGet packages
uses: actions/cache@v6
with:
path: ${{ github.workspace }}/.nuget/packages
key: ${{ runner.os }}-nuget-${{ hashFiles('**/Directory.Packages.props') }}
restore-keys: |
${{ runner.os }}-nuget-
- name: Restore
run: dotnet restore NeoReports.sln
- name: Build
run: dotnet build NeoReports.sln --configuration Release --no-restore
- name: Install Playwright browsers
# The E2E suite drives a real Chromium against the app. Runs after Build so the
# generated playwright.ps1 exists; --with-deps pulls the shared libraries a headless
# browser needs on a bare runner. Skipped browsers would make the E2E tests self-skip,
# so the install failing must fail the job rather than quietly reduce coverage.
run: pwsh tests/NeoReports.WebUi.E2ETests/bin/Release/net8.0/playwright.ps1 install --with-deps chromium
- name: Test
env:
# Fail (don't silently skip) the Testcontainers integration suites if Docker can't start.
# GitHub-hosted Linux runners always have Docker, so a skip here would mean a broken image
# or a Docker outage — which must not pass as green. Read by tests/Shared/DockerGate.cs.
# Local `dotnet test` leaves the var unset and keeps skipping, so contributors without
# Docker can still run the suite.
NEOREPORTS_REQUIRE_DOCKER: "1"
# Same reasoning for the browser: installing it is not proof it launches, and without this a
# driver mismatch or an OOM-killed Chromium would skip most of the E2E suite silently.
NEOREPORTS_REQUIRE_BROWSER: "1"
run: dotnet test NeoReports.sln --configuration Release --no-build --verbosity normal
- name: Format (verify)
run: dotnet format NeoReports.sln --verify-no-changes --no-restore