master-ci-pr #367
This file contains 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: ci-pr | |
run-name: ${{ github.head_ref || github.ref_name }}-ci-pr | |
on: | |
pull_request: | |
paths-ignore: | |
- '**.jpg' | |
- '**.png' | |
- '**.md' | |
#- '**.yml' | |
workflow_dispatch: | |
concurrency: | |
group: ci-pr-${{ github.event.number }} | |
cancel-in-progress: true | |
jobs: | |
analyzer-test: | |
name: "GdUnit4Net Analyzer Tests" | |
runs-on: 'ubuntu-22.04' | |
timeout-minutes: 3 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: 8.0.x | |
- name: "Build" | |
if: ${{ !cancelled() }} | |
run: | | |
dotnet build ./api/gdUnit4Api.csproj | |
dotnet build ./analyzers/gdUnit4Analyzers.csproj | |
dotnet build ./analyzers.test/gdUnit4Analyzers.Tests.csproj | |
- name: "Run Unit Tests" | |
if: ${{ !cancelled() }} | |
run: | | |
cd analyzers.test | |
dotnet test gdUnit4Analyzers.Tests.csproj --settings .runsettings --no-build --verbosity normal | |
- name: "Upload Unit Test Reports" | |
if: ${{ !cancelled() }} | |
uses: actions/upload-artifact@v4 | |
with: | |
retention-days: 10 | |
name: artifact_analyzer | |
path: | | |
./analyzers.test/TestResults/test-result.trx | |
./analyzers.test/TestResults/test-result.html | |
unit-tests: | |
strategy: | |
fail-fast: false | |
max-parallel: 10 | |
matrix: | |
godot-version: ['4.2', '4.2.1', '4.2.2', '4.3'] | |
godot-status: ['stable'] | |
include: | |
- godot-version: '4.4' | |
godot-status: 'dev3' | |
name: "🐧 GdUnit4Net Test Godot-v${{ matrix.godot-version }}-${{ matrix.godot-status }}" | |
uses: ./.github/workflows/unit-tests.yml | |
with: | |
godot-version: ${{ matrix.godot-version }} | |
godot-status: ${{ matrix.godot-status }} | |
finalize: | |
if: ${{ !cancelled() }} | |
runs-on: ubuntu-latest | |
name: Final Results | |
needs: [analyzer-test, unit-tests] | |
steps: | |
- run: exit 1 | |
if: >- | |
${{ | |
contains(needs.*.result, 'failure') | |
|| contains(needs.*.result, 'cancelled') | |
}} |