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
| name: Validation and Tests | |
| on: | |
| push: | |
| branches: | |
| - master | |
| pull_request: | |
| branches: | |
| - master | |
| jobs: | |
| SPMValidation: | |
| runs-on: macos-latest | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - name: SPM describe | |
| run: swift package describe | |
| - name: SPM resolve | |
| run: swift package resolve | |
| - name: SPM build all targets | |
| run: swift package resolve | |
| UnitTests: | |
| runs-on: macos-latest | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - name: Setup MySQL | |
| uses: ankane/setup-mysql@v1 | |
| with: | |
| mysql-version: 8.0 | |
| database: tests | |
| - name: Run tests | |
| run: xcodebuild -project OHMySQL.xcodeproj -scheme "OHMySQLTests" -parallel-testing-enabled NO -destination "platform=iOS Simulator,OS=latest,name=iPhone 15" test \ | |
| USER_NAME='root' \ | |
| USER_PASSWORD='' \ | |
| DB_NAME='tests' \ | |
| DB_HOST='localhost' \ | |
| DB_PORT='3306' \ | |
| DB_SOCKET='/tmp/mysql.sock' | xcpretty |