mirror of
https://github.com/2dust/v2rayN.git
synced 2026-09-13 18:02:07 +03:00
The Code Test workflow only has a pull_request trigger, so the suite never runs against master itself: a direct push is untested, and a merge can break tests even when the pull request's own check was green, because checks run on the PR head rather than on the merged result. Add a push trigger for master with the same paths filter. Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
53 lines
1.2 KiB
YAML
53 lines
1.2 KiB
YAML
name: Code Test
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
paths:
|
|
- 'v2rayN/ServiceLib/**'
|
|
- 'v2rayN/ServiceLib.UdpTest/**'
|
|
- 'v2rayN/ServiceLib.Tests/**'
|
|
- 'v2rayN/Directory.Build.*'
|
|
- 'v2rayN/Directory.Packages.props'
|
|
- 'global.json'
|
|
- '.github/workflows/test.yml'
|
|
pull_request:
|
|
branches:
|
|
- master
|
|
paths:
|
|
- 'v2rayN/ServiceLib/**'
|
|
- 'v2rayN/ServiceLib.UdpTest/**'
|
|
- 'v2rayN/ServiceLib.Tests/**'
|
|
- 'v2rayN/Directory.Build.*'
|
|
- 'v2rayN/Directory.Packages.props'
|
|
- 'global.json'
|
|
- '.github/workflows/test.yml'
|
|
|
|
permissions:
|
|
checks: write
|
|
pull-requests: write
|
|
|
|
jobs:
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v7
|
|
|
|
- name: Setup .NET
|
|
uses: actions/setup-dotnet@v6
|
|
with:
|
|
dotnet-version: '10.x'
|
|
dotnet-quality: 'ga'
|
|
|
|
- name: Test Code
|
|
run: dotnet test --project ./v2rayN/ServiceLib.Tests -c Release --results-directory ./TestResults -- --report-trx
|
|
|
|
- name: Comment PR with results
|
|
if: always()
|
|
uses: EnricoMi/publish-unit-test-result-action@v2
|
|
with:
|
|
files: ./TestResults/*.trx
|
|
comment_mode: failures
|