Repository navigation
107 lines (99 loc) · 4.13 KB
/
Copy pathcsharp.yml
File metadata and controls
107 lines (99 loc) · 4.13 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
96
97
98
99
100
101
102
103
104
105
106
107
name: C#
on:
workflow_dispatch:
push:
branches: [main]
paths: ['csharp/**', 'experiments/**/*.cs', 'experiments/**/*.csproj', 'experiments/system_data_sqlite/**', 'experiments/postgresql/**', '.github/workflows/csharp.yml', '.github/actions/**', 'scripts/check_pipeline_status.py', 'scripts/ci_process.py', 'scripts/workflow_yaml.py']
pull_request:
paths: ['csharp/**', 'experiments/**/*.cs', 'experiments/**/*.csproj', 'experiments/system_data_sqlite/**', 'experiments/postgresql/**', '.github/workflows/csharp.yml', '.github/actions/**', 'scripts/check_pipeline_status.py', 'scripts/ci_process.py', 'scripts/workflow_yaml.py']
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
defaults:
run:
working-directory: csharp
jobs:
test:
name: Test (${{ matrix.os }})
runs-on: ${{ matrix.os }}
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
os: [ubuntu-24.04, macos-15, windows-2025]
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
fetch-depth: 0
persist-credentials: false
- uses: ./.github/actions/prepare-ci # zizmor: ignore[self-repository] actionlint 1.7.12 lacks $/ syntax
- uses: actions/setup-dotnet@a98b56852c35b8e3190ac28c8c2271da59106c68 # v6
with:
global-json-file: csharp/global.json
- run: dotnet format whitespace SQLiteVSDoublets.slnx --verify-no-changes
- name: Format every C# experiment
shell: bash
run: |
while IFS= read -r project; do
dotnet format whitespace "../$project" --verify-no-changes
done < <(git -C .. ls-files 'experiments/**/*.csproj')
- run: dotnet build -c Release -warnaserror
- run: dotnet test --project SQLiteVSDoublets.Tests -c Release --no-build -- --timeout 10m
- name: Check SQLite provider reports
run: python ../experiments/system_data_sqlite/check_reports.py
postgresql:
name: PostgreSQL integration
runs-on: ubuntu-24.04
timeout-minutes: 15
services:
postgres:
image: postgres:18.3@sha256:7e32e9833a6fb1c92c32552794cb6ed569d51b445a54907d35fc112ef39684db
env:
POSTGRES_USER: benchmark
POSTGRES_PASSWORD: benchmark
POSTGRES_DB: benchmark
ports: ['5432:5432']
options: --health-cmd "pg_isready -U benchmark" --health-interval 5s --health-timeout 5s --health-retries 12
env:
POSTGRESQL_CONNECTION_STRING: Host=127.0.0.1;Database=benchmark;Username=benchmark;Password=benchmark
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
fetch-depth: 0
persist-credentials: false
- uses: ./.github/actions/prepare-ci # zizmor: ignore[self-repository] actionlint 1.7.12 lacks $/ syntax
- uses: actions/setup-dotnet@a98b56852c35b8e3190ac28c8c2271da59106c68 # v6
with:
global-json-file: csharp/global.json
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7
with:
python-version: '3.13'
- run: dotnet build -c Release -warnaserror
- run: dotnet test --project SQLiteVSDoublets.Tests -c Release --no-build -- --filter-class '*PostgreSQLTests' --timeout 5m
- run: python ../experiments/postgresql/check_reports.py
pipeline-status:
name: Pipeline Status
needs: [test, postgresql]
if: ${{ !cancelled() }}
runs-on: ubuntu-24.04
timeout-minutes: 5
defaults:
run:
working-directory: .
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
persist-credentials: false
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7
with:
python-version: '3.13'
- run: python -m pip install PyYAML==6.0.3
- name: Check terminal status
env:
NEEDS_JSON: ${{ toJSON(needs) }}
WORKFLOW_FILE: .github/workflows/csharp.yml
RUN_REF: ${{ github.ref }}
RUN_SHA: ${{ github.sha }}
run: python scripts/check_pipeline_status.py