Fix Swift 6.1 and 6.2 Issues #223
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: pull-request-validation | |
| on: | |
| pull_request: | |
| branches: | |
| - "*" | |
| jobs: | |
| commit-lint: | |
| name: Lint Commit Messages | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Install Node.js and NPM | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "14" | |
| - name: Install commitlint | |
| run: npm install -g @commitlint/cli@11.0.0 @commitlint/config-conventional@11.0.0 | |
| - name: Run commitlint | |
| run: commitlint -x @commitlint/config-conventional --from=${{ github.event.pull_request.base.sha }} --to=${{ github.event.pull_request.head.sha }} | |
| swift-lint: | |
| name: SwiftLint | |
| runs-on: macos-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Install SwiftLint | |
| run: brew install swiftlint | |
| - name: Run SwiftLint | |
| run: swiftlint lint --strict Sources Tests/MockableTests | |
| test: | |
| name: Test Swift ${{ matrix.swift }} on ${{ matrix.os }} | |
| runs-on: ${{ matrix.os }} | |
| env: | |
| MOCKABLE_LINT: false | |
| MOCKABLE_TEST: true | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, macos-latest] | |
| swift: ["5.9", "5.10", "6.0", "6.1", "6.2"] | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Swift | |
| uses: mman/setup-swift@bb9d928d17930db5f808fa68520e2dc2e0ff1f2c | |
| with: | |
| swift-version: ${{ matrix.swift }} | |
| - name: Swift version | |
| run: swift --version | |
| - name: Build | |
| run: swift build | |
| - name: Run tests | |
| run: swift test |