From 2f99bc3fa5b83c1a01b22da7217a3c9677358d04 Mon Sep 17 00:00:00 2001 From: Franz Busch Date: Tue, 2 Jul 2024 13:26:56 +0100 Subject: [PATCH] [GHA] Introduce the first GitHub Action (#2760) # Motivation We want to move our CI over to use GitHub Actions. We need to cover multiple different things like unit tests, benchmarks, soundness, API breaks, doc validation etc. # Modification This PR starts our journey to GitHub Actions by introducing the PR workflow. Right now this workflow only runs the Swift tests on our repository without any additional compiler flags like `-warnings-as-errors`. This aims to get us started and we will continue to modify them in subsequent PRs. # Result We got our first GH workflows running --- .github/workflows/pull_requests.yml | 31 +++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .github/workflows/pull_requests.yml diff --git a/.github/workflows/pull_requests.yml b/.github/workflows/pull_requests.yml new file mode 100644 index 000000000..379781752 --- /dev/null +++ b/.github/workflows/pull_requests.yml @@ -0,0 +1,31 @@ +name: Pull Request + +on: + pull_request: + types: [opened, reopened, synchronize, ready_for_review] + +## We are cancelling previously triggered workflow runs +concurrency: + group: ${{ github.workflow }}-${{ github.event.ref }} + cancel-in-progress: true + +jobs: + unit-tests: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + swift: + - image: swift5.8-jammy + - image: swift5.9-jammy + - image: swift5.10-noble + - image: swiftlang/swift:nightly-6.0-jammy + - image: swiftlang/swift:nightly-main-jammy + container: + image: ${{ matrix.swift.image }} + steps: + - name: Checkout repository + uses: actions/checkout@v4 + - name: Run tests + run: swift test + timeout-minutes: 20 \ No newline at end of file