From b58f6864ef86a90a587c7d7f3e5cb08081e48e4f Mon Sep 17 00:00:00 2001 From: Alberto De Bortoli Date: Fri, 23 Aug 2024 09:57:46 +0100 Subject: [PATCH 1/3] Add run_tests.yml workflow --- .github/workflows/run_tests.yml | 42 +++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 .github/workflows/run_tests.yml diff --git a/.github/workflows/run_tests.yml b/.github/workflows/run_tests.yml new file mode 100644 index 0000000..8415d78 --- /dev/null +++ b/.github/workflows/run_tests.yml @@ -0,0 +1,42 @@ +name: Run tests + +on: + workflow_dispatch: + push: + branches: + - main + pull_request: + branches: + - '**' + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + run-tests-macos: + name: Run tests (macOS) + runs-on: macos-14 + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Install dependencies + run: swift package resolve + + - name: Run tests + run: swift test + + run-tests-linux: + name: Run tests (Linux) + runs-on: ubuntu-20.04 + container: swift:5.9-jammy + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Install dependencies + run: swift package resolve + + - name: Run tests + run: swift test From 5a073a64ae8b963d11f5d4108e358d5587329123 Mon Sep 17 00:00:00 2001 From: Alberto De Bortoli Date: Fri, 23 Aug 2024 10:41:30 +0100 Subject: [PATCH 2/3] Add badge to README --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index f91ddce..a65cf58 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # PackageGenerator +![Build Status](https://github.com/justeattakeaway/PackageGenerator/actions/workflows/run_tests.yml/badge.svg?branch=main) + A tool to generate `Package.swift` files using a custom DSL allowing version alignment of dependencies across packages. From bc893a8305829a3ff94ce4ec44d64254d7569918 Mon Sep 17 00:00:00 2001 From: Alberto De Bortoli Date: Sat, 24 Aug 2024 10:27:24 +0100 Subject: [PATCH 3/3] Update checkout action to v4 --- .github/workflows/run_tests.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/run_tests.yml b/.github/workflows/run_tests.yml index 8415d78..cc57de8 100644 --- a/.github/workflows/run_tests.yml +++ b/.github/workflows/run_tests.yml @@ -19,7 +19,7 @@ jobs: runs-on: macos-14 steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Install dependencies run: swift package resolve @@ -33,7 +33,7 @@ jobs: container: swift:5.9-jammy steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Install dependencies run: swift package resolve