use .net 10 in actions and test project #781
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
| name: .NET (CI) | |
| on: | |
| push: | |
| branches: [ "main" ] | |
| pull_request: | |
| branches: [ "main" ] | |
| schedule: | |
| # Runs every Sunday at 4 AM UTC | |
| - cron: "0 4 * * 0" | |
| jobs: | |
| build-and-test: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| dotnet: [ '10.x' ] | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v5 | |
| with: | |
| dotnet-version: ${{ matrix.dotnet }} | |
| - name: Restore dependencies | |
| run: dotnet restore | |
| - name: Build | |
| run: dotnet build --no-restore | |
| - name: Test on Pull Requests (Unauthenticated only) | |
| if: github.event_name == 'pull_request' | |
| run: dotnet test --no-build --verbosity normal --filter "Category!=Authenticated" | |
| - name: Test on Main Branch & Scheduled Runs (All tests) | |
| if: github.event_name != 'pull_request' | |
| env: | |
| MODRINTH_API_KEY: ${{ secrets.MODRINTH_TOKEN }} | |
| run: dotnet test --no-build --verbosity normal |