From 34a5b0f21dfc9388fecbc8d9ebef90d5b75b8a7f Mon Sep 17 00:00:00 2001 From: s2quake Date: Thu, 27 Jun 2024 20:35:10 +0900 Subject: [PATCH] WIP --- .github/workflows/build-and-test.yml | 32 +++++++------------------- .github/workflows/publish-and-test.yml | 14 +++++++++++ 2 files changed, 22 insertions(+), 24 deletions(-) create mode 100644 .github/workflows/publish-and-test.yml diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index 94341fa..7353b8a 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -1,40 +1,24 @@ name: Build and Test on: - pull_request: + pull_request: env: TEST_RESULTS_PATH: ${{ github.workspace }}/test-results.trx -permissions: - contents: read - actions: read - checks: write - jobs: build: runs-on: ubuntu-latest steps: - - name: Checkout code - uses: actions/checkout@v4.1.7 - - name: Setup .NET - uses: actions/setup-dotnet@v4.0.0 + - uses: actions/checkout@v4.1.7 + - uses: actions/setup-dotnet@v4.0.0 with: dotnet-version: 8.0.100 - - name: Dotnet Build - run: dotnet build --configuration Release - - name: Dotnet Test - run: | - dotnet test --configuration Release --no-restore --no-build --logger "trx;LogFileName=${{ env.TEST_RESULTS_PATH }}" - - name: Upload test results - uses: actions/upload-artifact@v4 - if: success() || failure() - with: - name: test-results - path: ${{ env.TEST_RESULTS_PATH }} - - name: Upload test results - uses: dorny/test-reporter@v1.9.1 - if: success() || failure() + - run: dotnet build --configuration Release + - run: | + dotnet test --configuration Release --no-restore --no-build \ + --logger "trx;LogFileName=${{ env.TEST_RESULTS_PATH }}" + - uses: dorny/test-reporter@v1 with: name: XUnit Tests path: ${{ env.TEST_RESULTS_PATH }} diff --git a/.github/workflows/publish-and-test.yml b/.github/workflows/publish-and-test.yml new file mode 100644 index 0000000..131b383 --- /dev/null +++ b/.github/workflows/publish-and-test.yml @@ -0,0 +1,14 @@ +name: Publish Test + +on: + pull_request: + +jobs: + publish: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4.1.7 + - uses: actions/setup-dotnet@v4.0.0 + with: + dotnet-version: 8.0.100 + - run: dotnet publish