Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
211 changes: 0 additions & 211 deletions .github/workflows/build-and-release.yml

This file was deleted.

74 changes: 74 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
name: CI

on:
push:
branches: ["main"]
pull_request:
branches: ["main"]

env:
GLOBAL_JSON_PATH: "./src/global.json"
PROJECT_PATH: "./src/TurboHTTP.slnx"
TEST_OUTPUT_DIRECTORY: "${{ github.workspace }}/testresults"
COVERAGE_REPORT_DIRECTORY: "./coveragereport"

permissions:
contents: read
checks: write
pull-requests: write

jobs:
build-and-test:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v6
with:
fetch-depth: 0

- name: Install .NET
uses: actions/setup-dotnet@v5
with:
global-json-file: ${{ env.GLOBAL_JSON_PATH }}
cache: true
cache-dependency-path: "**/packages.lock.json"

- name: Restore dependencies
run: dotnet restore ${{ env.PROJECT_PATH }}

- name: Build
run: >
dotnet build
--configuration Release
--no-restore
${{ env.PROJECT_PATH }}

- name: Install libmsquic
run: |
sudo apt-get update
sudo apt-get install -y libmsquic

- name: Run tests
working-directory: "./src"
run: >
dotnet test
--configuration Release
--no-ansi
--no-build
--coverage
--coverage-output-format cobertura
--results-directory ${{ env.TEST_OUTPUT_DIRECTORY }}
--solution *.slnx

- name: Report Code Coverage
if: always()
uses: danielpalme/ReportGenerator-GitHub-Action@5
with:
reports: "${{ env.TEST_OUTPUT_DIRECTORY }}/*cobertura.xml"
targetdir: "${{ env.COVERAGE_REPORT_DIRECTORY }}"
reporttypes: "MarkdownSummaryGithub"

- name: Add Coverage Summary to Job Summary
if: always()
run: cat ${{ env.COVERAGE_REPORT_DIRECTORY }}/SummaryGithub.md >> $GITHUB_STEP_SUMMARY
45 changes: 45 additions & 0 deletions .github/workflows/commitlint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Commit Lint

on:
pull_request:
branches: ["main"]
types: [opened, edited, synchronize]

permissions:
contents: read
pull-requests: read

jobs:
lint-pr-title:
runs-on: ubuntu-latest

steps:
- name: Validate PR title
uses: amannn/action-semantic-pull-request@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
types: |
feat
fix
perf
docs
chore
refactor
test
ci
build

lint-commits:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v6
with:
fetch-depth: 0

- name: Validate commit messages
uses: wagoid/commitlint-github-action@v6
with:
configFile: commitlint.config.mjs
Loading
Loading