From 51614dd7044a57c2c54a0cdb25ce0288e7f98e15 Mon Sep 17 00:00:00 2001 From: "Cassidy Spring (Bee)" <79487947+beeauvin@users.noreply.github.com> Date: Wed, 26 Nov 2025 15:40:47 -0800 Subject: [PATCH] test: better testing around installs Doesn't test caching but at least gets us closer to making sure the right version is installed :P --- .github/workflows/tests.yml | 16 ++++++++-------- action.yml | 5 +++++ 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 5d31ffe..98c27c4 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -20,18 +20,18 @@ jobs: strategy: matrix: os: [macos-latest, ubuntu-latest] - swift-version: ["latest", "6.1"] + swift-version: ["latest", "6", "6.1"] runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v6 - uses: ./ + id: swiftly-swift with: swift-version: ${{ matrix.swift-version }} - - name: test - latest - if: ${{ matrix.swift-version == 'latest' }} + - name: Verify Swift Version shell: bash - run: swift --version | grep -q 'Swift version' - - name: test - version - if: ${{ matrix.swift-version != 'latest' }} - shell: bash - run: swift --version | grep -q 'Swift version ${{ matrix.swift-version }}' + run: | + echo "Input version: ${{ matrix.swift-version }}" + echo "Resolved version: ${{ steps.swiftly-swift.outputs.swift-version }}" + swift --version + swift --version | grep -q 'Swift version ${{ steps.swiftly-swift.outputs.swift-version }}' diff --git a/action.yml b/action.yml index b7fa3a1..9425b9d 100644 --- a/action.yml +++ b/action.yml @@ -16,6 +16,11 @@ inputs: required: true default: latest +outputs: + swift-version: + description: The resolved Swift version that was installed. + value: ${{ steps.resolve-version.outputs.version }} + runs: using: composite steps: