From 4f6f0bbc2206cadc03e4675222403fdb73d87746 Mon Sep 17 00:00:00 2001 From: Goncalo Frade Date: Sun, 28 Jan 2024 18:31:06 +0000 Subject: [PATCH] build: fix workflow --- .github/workflows/release.yml | 18 ++++++++++++++++++ .github/workflows/test.yml | 19 +++++++++++++------ 2 files changed, 31 insertions(+), 6 deletions(-) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..fbce093 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,18 @@ +name: Swift + +on: + push: + branches: [ "main" ] + +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + +jobs: + build: + runs-on: macos-13 + + steps: + - uses: actions/checkout@v3 + - name: Build + run: xcodebuild build test -scheme "peerdid-swift" -destination "platform=macOS" -resultBundlePath TestResults diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f4167c2..8fcf7f7 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -4,20 +4,27 @@ name: Swift on: - push: - branches: [ "main" ] pull_request: branches: [ "main" ] +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + jobs: build: - runs-on: macos-latest + runs-on: macos-13 steps: - uses: actions/checkout@v3 - name: Build - run: swift build -v - - name: Run tests - run: swift test -v + run: xcodebuild build test -scheme "peerdid-swift" -destination "platform=macOS" -resultBundlePath TestResults + + - name: Publish tests results + uses: kishikawakatsumi/xcresulttool@v1.7.1 + with: + path: TestResults.xcresult + show-code-coverage: true + if: success() || failure()