From deeb9b59a7f460f6d23f571001cd9654994fe681 Mon Sep 17 00:00:00 2001 From: s2quake Date: Sun, 16 Jun 2024 18:45:39 +0900 Subject: [PATCH] ci: Add build-test github action --- .github/workflows/build-and-test.yml | 29 ++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 .github/workflows/build-and-test.yml diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml new file mode 100644 index 00000000..11832d3d --- /dev/null +++ b/.github/workflows/build-and-test.yml @@ -0,0 +1,29 @@ +name: Build and Test + +on: + pull_request: + +jobs: + build: + 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 build --configuration Release + - run: | + dotnet test --configuration Release --no-restore --no-build \ + --logger "trx;LogFileName=${{ github.workspace }}/test-results.trx" + - run: echo "PWD=$(pwd)" >> $GITHUB_ENV + - uses: dorny/test-reporter@v1.9.1 + if: success() || failure() + with: + name: XUnit Tests + path: ${{ github.workspace }}/test-results.trx + reporter: dotnet-trx + - uses: actions/upload-artifact@v4 + if: success() || failure() + with: + name: test-results + path: ${{ github.workspace }}/test-results.trx