From 45fdb7221d5f5d7f94c1d619b8dc5d7e91957ca7 Mon Sep 17 00:00:00 2001 From: Gentian Barileva Date: Fri, 2 Feb 2024 12:21:47 +0100 Subject: [PATCH 1/4] Run tests when a PR is updated or re-opened. --- .github/workflows/Tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/Tests.yml b/.github/workflows/Tests.yml index 20e39ac7..2f5e4425 100644 --- a/.github/workflows/Tests.yml +++ b/.github/workflows/Tests.yml @@ -3,7 +3,7 @@ name: Tests on: push: pull_request: - types: [opened] + types: [ opened, synchronize, reopened ] jobs: Tests: From 26f9654d621626936899f259829b43c86b8360d9 Mon Sep 17 00:00:00 2001 From: Gentian Barileva Date: Fri, 2 Feb 2024 12:22:43 +0100 Subject: [PATCH 2/4] Replace cancel action with native concurrency option. --- .github/workflows/Tests.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/Tests.yml b/.github/workflows/Tests.yml index 2f5e4425..d3afad7d 100644 --- a/.github/workflows/Tests.yml +++ b/.github/workflows/Tests.yml @@ -5,13 +5,14 @@ on: pull_request: types: [ opened, synchronize, reopened ] +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + jobs: Tests: runs-on: macos-13 steps: - - name: Cancel previous jobs - uses: styfle/cancel-workflow-action@0.11.0 - - name: Checkout Repository uses: actions/checkout@v3 From da7d12f66fc2dc8d8af3fb2805069ed59aa682e8 Mon Sep 17 00:00:00 2001 From: Gentian Barileva Date: Fri, 2 Feb 2024 12:23:01 +0100 Subject: [PATCH 3/4] Update checkout to v4. --- .github/workflows/Tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/Tests.yml b/.github/workflows/Tests.yml index d3afad7d..e75aedd6 100644 --- a/.github/workflows/Tests.yml +++ b/.github/workflows/Tests.yml @@ -14,7 +14,7 @@ jobs: runs-on: macos-13 steps: - name: Checkout Repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Load Latest Xcode uses: maxim-lobanov/setup-xcode@v1 From 579ff997d20711e422ef703b8d10d22d5c14238e Mon Sep 17 00:00:00 2001 From: Gentian Barileva Date: Fri, 2 Feb 2024 12:23:54 +0100 Subject: [PATCH 4/4] Replace `xcpretty` with `xcbeautify` to show annotations in actions summary. --- .github/workflows/Tests.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/Tests.yml b/.github/workflows/Tests.yml index e75aedd6..91908234 100644 --- a/.github/workflows/Tests.yml +++ b/.github/workflows/Tests.yml @@ -22,8 +22,8 @@ jobs: xcode-version: latest-stable - name: Build project - run: set -o pipefail && env NSUnbufferedIO=YES xcodebuild build-for-testing -destination 'name=iPhone 14 Pro' -scheme 'PovioKit-Package' | xcpretty + run: set -o pipefail && env NSUnbufferedIO=YES xcodebuild build-for-testing -destination 'name=iPhone 14 Pro' -scheme 'PovioKit-Package' | xcbeautify --renderer github-actions - name: Run tests - run: set -o pipefail && env NSUnbufferedIO=YES xcodebuild test-without-building -destination 'name=iPhone 14 Pro' -scheme 'PovioKit-Package' | xcpretty + run: set -o pipefail && env NSUnbufferedIO=YES xcodebuild test-without-building -destination 'name=iPhone 14 Pro' -scheme 'PovioKit-Package' | xcbeautify --renderer github-actions