Update swift.yml #8
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This workflow will build a Swift project | |
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-swift | |
name: Swift | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout source code | |
uses: actions/checkout@v3 | |
- name: Install Swift development snapshot | |
run: | | |
wget https://download.swift.org/development/ubuntu2204/swift-DEVELOPMENT-SNAPSHOT-2024-05-20-a/swift-DEVELOPMENT-SNAPSHOT-2024-05-20-a-ubuntu22.04.tar.gz | |
tar xzf swift-DEVELOPMENT-SNAPSHOT-2024-05-20-a-ubuntu22.04.tar.gz | |
sudo mv swift-DEVELOPMENT-SNAPSHOT-2024-05-20-a-ubuntu22.04 /usr/local/swift | |
echo "export PATH=/usr/local/swift/usr/bin:$PATH" >> $GITHUB_ENV | |
- name: Verify Swift version | |
run: swift --version | |
- name: Build project | |
run: swift build | |
- name: Run tests | |
run: swift test |