Skip to content

Commit

Permalink
Re-enabled Linux tests with Swift 5.5 installation
Browse files Browse the repository at this point in the history
  • Loading branch information
herlandro committed Sep 17, 2024
1 parent 07c87b7 commit 83b668f
Showing 1 changed file with 40 additions and 12 deletions.
52 changes: 40 additions & 12 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,20 +19,48 @@ jobs:

steps:
- uses: actions/checkout@v3

# Select Xcode 15.3
- name: Select Xcode 15.3
run: sudo xcode-select -s /Applications/Xcode_15.3.app

# Verify that the correct Swift version (5.5 or higher) is installed
- name: Verify Swift version
run: |
swift --version
if ! swift --version | grep -q "5.5"; then
echo "Error: Swift 5.5 is required, but a different version is installed."
exit 1
fi
# Run tests in the selected environment
- name: Run Tests
run: CI=1 ./scripts/all-tests.sh "${{ matrix.environment }}"

# We're having some issues with the Linux tests, so we're disabling them for now.
# Hopefully we'll be able to fix and re-enable them soon.
# Even more hopefully that I won't git blame this comment in the future and see it was 5 years ago :)

# linux:
# name: "Test (Linux)"
# runs-on: ubuntu-latest

# steps:
# - uses: actions/checkout@v3
# - name: Run tests
# run: CI=1 ./scripts/all-tests.sh "Unix"
# Re-enabled Linux tests with Swift 5.5 installation
linux:
name: "Test (Linux)"
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

# Install Swift 5.5 in the Linux environment
- name: Install Swift 5.5
run: |
sudo apt-get update
sudo apt-get install -y curl libssl-dev
git clone https://github.com/kylef/swiftenv.git ~/.swiftenv
echo 'export SWIFTENV_ROOT="$HOME/.swiftenv"' >> ~/.bashrc
echo 'export PATH="$SWIFTENV_ROOT/bin:$PATH"' >> ~/.bashrc
echo 'eval "$(swiftenv init -)"' >> ~/.bashrc
export SWIFTENV_ROOT="$HOME/.swiftenv"
export PATH="$SWIFTENV_ROOT/bin:$PATH"
eval "$(swiftenv init -)"
swiftenv install 5.5
swiftenv global 5.5
swift --version
# Run tests in the Unix/Linux environment
- name: Run tests
run: CI=1 ./scripts/all-tests.sh "Unix"

0 comments on commit 83b668f

Please sign in to comment.