ci: automate code formatting and linting with git hooks (#14) #26
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: "snacker" | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - dev | |
| pull_request: | |
| paths: | |
| - '.swiftlint.yml' | |
| - ".github/workflows/**" | |
| - "Package.swift" | |
| - "Source/**" | |
| - "Tests/**" | |
| jobs: | |
| iOS: | |
| name: ${{ matrix.name }} | |
| runs-on: ${{ matrix.runsOn }} | |
| env: | |
| DEVELOPER_DIR: "/Applications/${{ matrix.xcode }}.app/Contents/Developer" | |
| timeout-minutes: 20 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - destination: "OS=18.1,name=iPhone 16 Pro" | |
| name: "iOS 18.1" | |
| xcode: "Xcode_16.1" | |
| runsOn: macOS-14 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: ${{ matrix.name }} | |
| run: xcodebuild test -scheme "Snacker" -destination "${{ matrix.destination }}" clean -enableCodeCoverage YES -resultBundlePath "test_output/${{ matrix.name }}.xcresult" || exit 1 | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ matrix.name }} | |
| path: test_output |