Skip to content

Commit 8feab8d

Browse files
committed
ci: add release please
1 parent 07310b9 commit 8feab8d

7 files changed

Lines changed: 234 additions & 211 deletions

File tree

.github/workflows/build-and-release.yml

Lines changed: 0 additions & 211 deletions
This file was deleted.

.github/workflows/ci.yml

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: ["main"]
6+
pull_request:
7+
branches: ["main"]
8+
9+
env:
10+
GLOBAL_JSON_PATH: "./src/global.json"
11+
PROJECT_PATH: "./src/TurboHTTP.slnx"
12+
TEST_OUTPUT_DIRECTORY: "${{ github.workspace }}/testresults"
13+
COVERAGE_REPORT_DIRECTORY: "./coveragereport"
14+
15+
permissions:
16+
contents: read
17+
checks: write
18+
pull-requests: write
19+
20+
jobs:
21+
build-and-test:
22+
runs-on: ubuntu-latest
23+
24+
steps:
25+
- name: Checkout
26+
uses: actions/checkout@v6
27+
with:
28+
fetch-depth: 0
29+
30+
- name: Install .NET
31+
uses: actions/setup-dotnet@v5
32+
with:
33+
global-json-file: ${{ env.GLOBAL_JSON_PATH }}
34+
cache: true
35+
cache-dependency-path: "**/packages.lock.json"
36+
37+
- name: Restore dependencies
38+
run: dotnet restore ${{ env.PROJECT_PATH }}
39+
40+
- name: Build
41+
run: >
42+
dotnet build
43+
--configuration Release
44+
--no-restore
45+
${{ env.PROJECT_PATH }}
46+
47+
- name: Install libmsquic
48+
run: |
49+
sudo apt-get update
50+
sudo apt-get install -y libmsquic
51+
52+
- name: Run tests
53+
working-directory: "./src"
54+
run: >
55+
dotnet test
56+
--configuration Release
57+
--no-ansi
58+
--no-build
59+
--coverage
60+
--coverage-output-format cobertura
61+
--results-directory ${{ env.TEST_OUTPUT_DIRECTORY }}
62+
--solution *.slnx
63+
64+
- name: Report Code Coverage
65+
if: always()
66+
uses: danielpalme/ReportGenerator-GitHub-Action@5
67+
with:
68+
reports: "${{ env.TEST_OUTPUT_DIRECTORY }}/*cobertura.xml"
69+
targetdir: "${{ env.COVERAGE_REPORT_DIRECTORY }}"
70+
reporttypes: "MarkdownSummaryGithub"
71+
72+
- name: Add Coverage Summary to Job Summary
73+
if: always()
74+
run: cat ${{ env.COVERAGE_REPORT_DIRECTORY }}/SummaryGithub.md >> $GITHUB_STEP_SUMMARY

.github/workflows/commitlint.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Commit Lint
2+
3+
on:
4+
pull_request:
5+
branches: ["main"]
6+
types: [opened, edited, synchronize]
7+
8+
permissions:
9+
contents: read
10+
pull-requests: read
11+
12+
jobs:
13+
lint-pr-title:
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- name: Validate PR title
18+
uses: amannn/action-semantic-pull-request@v5
19+
env:
20+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
21+
with:
22+
types: |
23+
feat
24+
fix
25+
perf
26+
docs
27+
chore
28+
refactor
29+
test
30+
ci
31+
build
32+
33+
lint-commits:
34+
runs-on: ubuntu-latest
35+
36+
steps:
37+
- name: Checkout
38+
uses: actions/checkout@v6
39+
with:
40+
fetch-depth: 0
41+
42+
- name: Validate commit messages
43+
uses: wagoid/commitlint-github-action@v6
44+
with:
45+
configFile: commitlint.config.mjs

0 commit comments

Comments
 (0)