Skip to content

Commit

Permalink
Compile snapshots as part of CI checks
Browse files Browse the repository at this point in the history
  • Loading branch information
liamnichols committed May 28, 2024
1 parent 455effb commit 66f3dab
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
13 changes: 13 additions & 0 deletions .github/scripts/compile-snapshots.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/usr/bin/env bash

echo "Swift Version:"
xcrun swift --version
echo ""

for snapshot in Tests/XCStringsToolTests/__Snapshots__/**/*.swift; do
echo "Compiling ‘$(basename $snapshot)"

if xcrun swiftc "$snapshot" -package-name "MyPackage" -o /dev/null ; then
echo " Success"
fi
done
10 changes: 10 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,16 @@ jobs:
uses: actions/checkout@v4
- name: Validate SPI Manifest
run: swift package plugin validate-spi-manifest
compile-snapshots:
name: Compile Snapshots
runs-on: macos-14
env:
DEVELOPER_DIR: /Applications/Xcode_15.4.app/Contents/Developer
steps:
- name: Checkout Repo
uses: actions/checkout@v4
- name: Compile Snapshots
run: .github/scripts/compile-snapshots.sh
unit-test:
name: Unit Tests (Xcode ${{ matrix.xcode }})
strategy:
Expand Down

0 comments on commit 66f3dab

Please sign in to comment.