-
Notifications
You must be signed in to change notification settings - Fork 0
Fix failing GitHub workflows and optimize for speed #197
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,15 +1,21 @@ | ||
| { | ||
| "permissions": { | ||
| "allow": [ | ||
| "Bash(git merge:*)", | ||
| "Bash(dotnet build:*)", | ||
| "Bash(cat:*)", | ||
| "Bash(dotnet test:*)", | ||
| "Bash(VSTEST_CONNECTION_TIMEOUT=180 dotnet test:*)", | ||
| "Bash(export VSTEST_CONNECTION_TIMEOUT=180)", | ||
| "Bash(find:*)" | ||
| ], | ||
| "deny": [], | ||
| "ask": [] | ||
| } | ||
| } | ||
| { | ||
| "permissions": { | ||
| "allow": [ | ||
| "Bash(git merge:*)", | ||
| "Bash(dotnet build:*)", | ||
| "Bash(cat:*)", | ||
| "Bash(dotnet test:*)", | ||
| "Bash(VSTEST_CONNECTION_TIMEOUT=180 dotnet test:*)", | ||
| "Bash(export VSTEST_CONNECTION_TIMEOUT=180)", | ||
| "Bash(find:*)", | ||
| "Bash(xargs ls:*)", | ||
| "Bash(gh run view:*)", | ||
| "Bash(cargo fmt:*)", | ||
| "Bash(cargo check:*)", | ||
| "Bash(git checkout:*)", | ||
| "Bash(git add:*)" | ||
| ], | ||
| "deny": [], | ||
| "ask": [] | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,50 +1,73 @@ | ||
| # This workflow will build and test .NET projects | ||
| # .NET Build and Test workflow | ||
| # Optimized with matrix strategy and path-based triggers | ||
|
|
||
| name: .NET | ||
|
|
||
| on: | ||
| push: | ||
| branches: ["main"] | ||
| paths: | ||
| - 'src/adguard-api-dotnet/**' | ||
| - 'src/rules-compiler-dotnet/**' | ||
| - '.github/workflows/dotnet.yml' | ||
| pull_request: | ||
| branches: ["main"] | ||
| paths: | ||
| - 'src/adguard-api-dotnet/**' | ||
| - 'src/rules-compiler-dotnet/**' | ||
| - '.github/workflows/dotnet.yml' | ||
|
|
||
| env: | ||
| DOTNET_NOLOGO: true | ||
| DOTNET_CLI_TELEMETRY_OPTOUT: true | ||
| DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true | ||
|
|
||
| jobs: | ||
| build-api-client: | ||
| name: Build API Client | ||
| build: | ||
| name: ${{ matrix.name }} | ||
| runs-on: ubuntu-latest | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| include: | ||
| - name: Build API Client | ||
| path: src/adguard-api-dotnet | ||
| solution: AdGuard.ApiClient.slnx | ||
| filter: "FullyQualifiedName!~Integration" | ||
| - name: Build Rules Compiler | ||
| path: src/rules-compiler-dotnet | ||
| solution: RulesCompiler.slnx | ||
| filter: "" | ||
|
|
||
| defaults: | ||
| run: | ||
| working-directory: ./src/adguard-api-dotnet | ||
| working-directory: ${{ matrix.path }} | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - name: Setup .NET | ||
| uses: actions/setup-dotnet@v4 | ||
| with: | ||
| dotnet-version: 10.0.x | ||
| - name: Restore dependencies | ||
| run: dotnet restore AdGuard.ApiClient.slnx | ||
| - name: Build | ||
| run: dotnet build AdGuard.ApiClient.slnx --no-restore | ||
| - name: Test | ||
| run: dotnet test AdGuard.ApiClient.slnx --no-build --verbosity normal --filter "FullyQualifiedName!~Integration" | ||
|
|
||
| build-rules-compiler: | ||
| name: Build Rules Compiler | ||
| runs-on: ubuntu-latest | ||
| defaults: | ||
| run: | ||
| working-directory: ./src/rules-compiler-dotnet | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - name: Setup .NET | ||
| uses: actions/setup-dotnet@v4 | ||
| - name: Cache NuGet packages | ||
| uses: actions/cache@v4 | ||
| with: | ||
| dotnet-version: 10.0.x | ||
| path: ~/.nuget/packages | ||
| key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.csproj', '**/*.slnx') }} | ||
| restore-keys: ${{ runner.os }}-nuget- | ||
|
|
||
| - name: Restore dependencies | ||
| run: dotnet restore RulesCompiler.slnx | ||
| run: dotnet restore ${{ matrix.solution }} | ||
|
|
||
| - name: Build | ||
| run: dotnet build RulesCompiler.slnx --no-restore | ||
| run: dotnet build ${{ matrix.solution }} --no-restore -c Release | ||
|
|
||
| - name: Test | ||
| run: dotnet test RulesCompiler.slnx --no-build --verbosity normal | ||
| run: | | ||
| if [ -n "${{ matrix.filter }}" ]; then | ||
| dotnet test ${{ matrix.solution }} --no-build -c Release --verbosity normal --filter "${{ matrix.filter }}" | ||
| else | ||
| dotnet test ${{ matrix.solution }} --no-build -c Release --verbosity normal | ||
| fi |
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.