From 1d310f635c159216600d7913ca545e3a529edada Mon Sep 17 00:00:00 2001 From: Christoph Rohde <44606665+CodebyCR@users.noreply.github.com> Date: Wed, 19 Mar 2025 22:21:09 +0100 Subject: [PATCH 1/9] Create main-safety.yml --- .github/workflows/main-safety.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 .github/workflows/main-safety.yml diff --git a/.github/workflows/main-safety.yml b/.github/workflows/main-safety.yml new file mode 100644 index 0000000..a120ec8 --- /dev/null +++ b/.github/workflows/main-safety.yml @@ -0,0 +1,20 @@ +# This workflow will build a Swift project +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-swift + +name: Main safety + +on: + pull_request: + branches: [ "main" ] + +jobs: + build_and_test: + + runs-on: macos-latest + + steps: + - uses: actions/checkout@v4 + - name: Build + run: swift build -v + - name: Run tests + run: swift test -v From aa0b1cc70d85a6777ff8af9f2465dc64535d5fab Mon Sep 17 00:00:00 2001 From: Christoph Rohde <44606665+CodebyCR@users.noreply.github.com> Date: Wed, 19 Mar 2025 21:26:36 +0000 Subject: [PATCH 2/9] Set swift version --- .github/workflows/main-safety.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/main-safety.yml b/.github/workflows/main-safety.yml index a120ec8..cb31fa1 100644 --- a/.github/workflows/main-safety.yml +++ b/.github/workflows/main-safety.yml @@ -14,6 +14,8 @@ jobs: steps: - uses: actions/checkout@v4 + with: + swift-version: "6.0.0" - name: Build run: swift build -v - name: Run tests From 296ffdf1c1bec81276ae28775c140a5ae0dfef21 Mon Sep 17 00:00:00 2001 From: Christoph Rohde <44606665+CodebyCR@users.noreply.github.com> Date: Wed, 19 Mar 2025 21:31:00 +0000 Subject: [PATCH 3/9] Use another swift action setup --- .github/workflows/main-safety.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main-safety.yml b/.github/workflows/main-safety.yml index cb31fa1..38f7f59 100644 --- a/.github/workflows/main-safety.yml +++ b/.github/workflows/main-safety.yml @@ -13,9 +13,11 @@ jobs: runs-on: macos-latest steps: - - uses: actions/checkout@v4 + - uses: swift-actions/setup-swift@v2 with: swift-version: "6.0.0" + - name: Get swift version + run: swift --version - name: Build run: swift build -v - name: Run tests From 877e03d60c1f8862cbe25e5dbf3f51feb3e56721 Mon Sep 17 00:00:00 2001 From: Christoph Rohde <44606665+CodebyCR@users.noreply.github.com> Date: Wed, 19 Mar 2025 21:32:17 +0000 Subject: [PATCH 4/9] fix indentation --- .github/workflows/main-safety.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main-safety.yml b/.github/workflows/main-safety.yml index 38f7f59..73e2411 100644 --- a/.github/workflows/main-safety.yml +++ b/.github/workflows/main-safety.yml @@ -15,7 +15,7 @@ jobs: steps: - uses: swift-actions/setup-swift@v2 with: - swift-version: "6.0.0" + swift-version: "6.0.0" - name: Get swift version run: swift --version - name: Build From 8b343f1ea60dba7135144df7697ae06edab85459 Mon Sep 17 00:00:00 2001 From: Christoph Rohde <44606665+CodebyCR@users.noreply.github.com> Date: Wed, 19 Mar 2025 21:43:23 +0000 Subject: [PATCH 5/9] Add debug comand --- .github/workflows/main-safety.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/main-safety.yml b/.github/workflows/main-safety.yml index 73e2411..db977c8 100644 --- a/.github/workflows/main-safety.yml +++ b/.github/workflows/main-safety.yml @@ -18,6 +18,8 @@ jobs: swift-version: "6.0.0" - name: Get swift version run: swift --version + - name: showFolder + run: pwd - name: Build run: swift build -v - name: Run tests From 8ca080a72feaf39200da245615bb45bf8048bd16 Mon Sep 17 00:00:00 2001 From: Christoph Rohde <44606665+CodebyCR@users.noreply.github.com> Date: Wed, 19 Mar 2025 21:50:23 +0000 Subject: [PATCH 6/9] Add more debugging --- .github/workflows/main-safety.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main-safety.yml b/.github/workflows/main-safety.yml index db977c8..7bdc4c2 100644 --- a/.github/workflows/main-safety.yml +++ b/.github/workflows/main-safety.yml @@ -19,7 +19,7 @@ jobs: - name: Get swift version run: swift --version - name: showFolder - run: pwd + run: pwd & ls -l - name: Build run: swift build -v - name: Run tests From 7b1f00d94afe9874705567bfbbe078750b826dd0 Mon Sep 17 00:00:00 2001 From: Christoph Rohde <44606665+CodebyCR@users.noreply.github.com> Date: Wed, 19 Mar 2025 21:59:33 +0000 Subject: [PATCH 7/9] Add more debug information --- .github/workflows/main-safety.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main-safety.yml b/.github/workflows/main-safety.yml index 7bdc4c2..95af2da 100644 --- a/.github/workflows/main-safety.yml +++ b/.github/workflows/main-safety.yml @@ -18,8 +18,12 @@ jobs: swift-version: "6.0.0" - name: Get swift version run: swift --version - - name: showFolder - run: pwd & ls -l + - name: showCurrentFolder + run: pwd + - name: showFolderContent + run: ls -l + - name: navToParentDir + run: cd.. - name: Build run: swift build -v - name: Run tests From 4e438d1e1feb7b3ddf195a74465f9cba96e821c6 Mon Sep 17 00:00:00 2001 From: Christoph Rohde <44606665+CodebyCR@users.noreply.github.com> Date: Wed, 19 Mar 2025 22:02:38 +0000 Subject: [PATCH 8/9] Fix cd command --- .github/workflows/main-safety.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main-safety.yml b/.github/workflows/main-safety.yml index 95af2da..4238b10 100644 --- a/.github/workflows/main-safety.yml +++ b/.github/workflows/main-safety.yml @@ -20,10 +20,10 @@ jobs: run: swift --version - name: showCurrentFolder run: pwd + - name: navToParentDir + run: cd .. - name: showFolderContent run: ls -l - - name: navToParentDir - run: cd.. - name: Build run: swift build -v - name: Run tests From e9c9395f9892118ab7425e99c03d4d05e18e1022 Mon Sep 17 00:00:00 2001 From: Christoph Rohde <44606665+CodebyCR@users.noreply.github.com> Date: Wed, 19 Mar 2025 22:16:02 +0000 Subject: [PATCH 9/9] Remove unnessary debug commands --- .github/workflows/main-safety.yml | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/.github/workflows/main-safety.yml b/.github/workflows/main-safety.yml index 4238b10..b159ce2 100644 --- a/.github/workflows/main-safety.yml +++ b/.github/workflows/main-safety.yml @@ -18,13 +18,7 @@ jobs: swift-version: "6.0.0" - name: Get swift version run: swift --version - - name: showCurrentFolder - run: pwd - - name: navToParentDir - run: cd .. - - name: showFolderContent - run: ls -l - - name: Build - run: swift build -v - - name: Run tests - run: swift test -v +# - name: Build +# run: swift build -v +# - name: Run tests +# run: swift test -v