fixing build-docc.sh script #115
This file contains hidden or 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: iOS Library CI | ||
| permissions: | ||
| contents: read | ||
| name: Swift | ||
| on: | ||
| push: | ||
| branches: [ "main" ] | ||
| pull_request: | ||
| branches: [ "main" ] | ||
| jobs: | ||
| build: | ||
| runs-on: macos-latest | ||
| steps: | ||
| - uses: swift-actions/setup-swift@v2 | ||
| with: | ||
| swift-version: "5.9" | ||
| - name: Get swift version | ||
| run: swift --version | ||
| - uses: actions/checkout@v4 | ||
| - name: Build | ||
| run: swift build -v | ||
| test: | ||
| runs-on: ubuntu-latest | ||
| needs: build | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - uses: swift-actions/setup-swift@v2 | ||
| with: | ||
| swift-version: "5.9" | ||
| - name: Start httpbin container | ||
| run: | | ||
| docker run -d -p 80:80 kennethreitz/httpbin | ||
| sleep 5 # give it a few seconds to start | ||
| - name: Run tests | ||
| env: | ||
| HTTPBIN_BASE_URL: http://localhost # if your tests need it | ||
| run: swift test -v | ||