Skip to content

Commit 4f74b52

Browse files
authored
Build and Unit Test CI (#3)
1 parent aff762e commit 4f74b52

File tree

2 files changed

+47
-1
lines changed

2 files changed

+47
-1
lines changed

.github/workflows/spm.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: spm
2+
3+
on:
4+
pull_request:
5+
schedule:
6+
# Run every day at 11pm (PST) - cron uses UTC times
7+
- cron: '0 7 * * *'
8+
9+
concurrency:
10+
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
11+
cancel-in-progress: true
12+
13+
jobs:
14+
changed_today:
15+
runs-on: ubuntu-latest
16+
name: Check if the repo was updated today
17+
outputs:
18+
WAS_CHANGED: ${{ steps.check_changed.outputs.WAS_CHANGED }}
19+
steps:
20+
- uses: actions/checkout@v4
21+
- id: check_changed
22+
name: Check
23+
if: ${{ github.event_name == 'schedule' }}
24+
run: echo '::set-output name=WAS_CHANGED::'$(test -n "$(git log --format=%H --since='24 hours ago')" && echo 'true' || echo 'false')
25+
26+
spm:
27+
needs: changed_today
28+
if: ${{ github.event_name == 'pull_request' || needs.changed_today.outputs.WAS_CHANGED == 'true' }}
29+
30+
strategy:
31+
matrix:
32+
os: [macos-14]
33+
target: [iOS, tvOS, macOS, catalyst, visionOS]
34+
xcode: [Xcode_15.2, Xcode_15.4, Xcode_16_Release_Candidate]
35+
runs-on: ${{ matrix.os }}
36+
steps:
37+
- uses: actions/checkout@v4
38+
- name: Xcode
39+
run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer
40+
- name: Setup Scripts Directory
41+
run: ./setup-scripts.sh
42+
- name: Initialize xcodebuild
43+
run: xcodebuild -list
44+
- name: iOS Unit Tests
45+
# TODO(aashishpatil-g): Change from spmbuildonly to spm when unit tests are fixed.
46+
run: scripts/third_party/travis/retry.sh scripts/build.sh FirebaseDataConnect ${{ matrix.target }} spmbuildonly

Sources/Scalars/LocalDate.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import Foundation
2020
Essentially represents: https://the-guild.dev/graphql/scalars/docs/scalars/local-date
2121
*/
2222
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
23-
public struct LocalDate: Codable, Equatable, CustomStringConvertible {
23+
public struct LocalDate: Codable, Equatable, Comparable, CustomStringConvertible {
2424
private var calendar = Calendar(identifier: .gregorian)
2525
private var dateFormatter = DateFormatter()
2626
private var date = Date()

0 commit comments

Comments
 (0)