diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c095a5cb60..46b345b911 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -92,7 +92,7 @@ jobs: run: ./build test+only --configuration=${{ matrix.configuration }} - name: Send Discord Notification - if: failure() + if: ${{ secrets.DISCORD_WEBHOOK && failure() }} env: JOB_STATUS: ${{ job.status }} WEBHOOK_URL: ${{ secrets.DISCORD_WEBHOOK }} diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 63948333f1..745c2e9a37 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -41,6 +41,7 @@ jobs: run: xvfb-run ./build test+only --configuration=Release --where="Category!=FlakyNetwork" - name: Generate Docker image and publish to Hub + if: ${{ secrets.DOCKERHUB_USERNAME && secrets.DOCKERHUB_PASSWORD && secrets.AWS_ACCESS_KEY_ID && secrets.AWS_SECRET_ACCESS_KEY }} env: DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} DOCKERHUB_PASSWORD: ${{ secrets.DOCKERHUB_PASSWORD }} @@ -51,6 +52,7 @@ jobs: echo "$DOCKERHUB_PASSWORD" | docker login -u "$DOCKERHUB_USERNAME" --password-stdin ./build docker-inflator - name: Push to S3 + if: ${{ secrets.AWS_ACCESS_KEY_ID && secrets.AWS_SECRET_ACCESS_KEY }} # Send ckan.exe and netkan.exe to https://ksp-ckan.s3-us-west-2.amazonaws.com/ uses: jakejarvis/s3-sync-action@master with: @@ -63,6 +65,7 @@ jobs: SOURCE_DIR: _build/repack/Release - name: Send Discord Notification + if: ${{ secrets.DISCORD_WEBHOOK }} env: JOB_STATUS: ${{ job.status }} WEBHOOK_URL: ${{ secrets.DISCORD_WEBHOOK }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 94a454ddc1..bd6f2c68d3 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -88,6 +88,7 @@ jobs: asset_content_type: application/vnd.microsoft.portable-executable - name: Send Discord Notification + if: ${{ secrets.DISCORD_WEBHOOK }} env: JOB_STATUS: ${{ job.status }} WEBHOOK_URL: ${{ secrets.DISCORD_WEBHOOK }} diff --git a/Tests/NetKAN/Sources/Spacedock/SpacedockApiTests.cs b/Tests/NetKAN/Sources/Spacedock/SpacedockApiTests.cs index e80d41d179..edf48d9945 100644 --- a/Tests/NetKAN/Sources/Spacedock/SpacedockApiTests.cs +++ b/Tests/NetKAN/Sources/Spacedock/SpacedockApiTests.cs @@ -1,5 +1,6 @@ using System; using System.IO; +using System.Net; using CKAN; using CKAN.NetKAN.Services; using CKAN.NetKAN.Sources.Spacedock; @@ -72,7 +73,7 @@ public void ThrowsWhenModMissing() TestDelegate act = () => sut.GetMod(-1); // Assert - Assert.That(act, Throws.Exception.InstanceOf()); + Assert.That(act, Throws.Exception.InstanceOf()); } } }