From 5442b2bcb4ca1675c484b6f6389c56eabaa2ef43 Mon Sep 17 00:00:00 2001 From: Drew Noakes Date: Mon, 29 Jan 2024 11:57:32 +1100 Subject: [PATCH] Add GitHub CI workflow I'm experimenting with GitHub actions for various purposes such as CI builds and automated releases. This is a first attempt. --- .github/workflows/CI.yml | 46 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 .github/workflows/CI.yml diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml new file mode 100644 index 000000000..d174dbefd --- /dev/null +++ b/.github/workflows/CI.yml @@ -0,0 +1,46 @@ +name: CI + +on: + + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +jobs: + + ununtu: + runs-on: ubuntu-latest + env: + DOTNET_NOLOGO: true + steps: + - uses: actions/checkout@v3 + - name: Setup .NET + uses: actions/setup-dotnet@v3 + with: + dotnet-version: 7.0.x + - name: Restore + run: dotnet restore MetadataExtractor.sln + - name: Build + run: dotnet build MetadataExtractor.sln --configuration Release + - name: Test net7.0 + run: dotnet test --verbosity normal --configuration Release --no-build -f net7.0 MetadataExtractor.Tests/MetadataExtractor.Tests.csproj + + windows: + runs-on: windows-latest + env: + DOTNET_NOLOGO: true + steps: + - uses: actions/checkout@v3 + - name: Setup .NET + uses: actions/setup-dotnet@v3 + with: + dotnet-version: 7.0.x + - name: Restore + run: dotnet restore MetadataExtractor.sln + - name: Build + run: dotnet build MetadataExtractor.sln --configuration Release + - name: Test net7.0 + run: dotnet test --verbosity normal --configuration Release --no-build -f net7.0 MetadataExtractor.Tests\MetadataExtractor.Tests.csproj + - name: Test net462 + run: dotnet test --verbosity normal --configuration Release --no-build -f net462 MetadataExtractor.Tests\MetadataExtractor.Tests.csproj