File tree Expand file tree Collapse file tree 3 files changed +65
-0
lines changed Expand file tree Collapse file tree 3 files changed +65
-0
lines changed Original file line number Diff line number Diff line change 1+ version : 2
2+ updates :
3+ - package-ecosystem : " github-actions"
4+ directory : " /"
5+ schedule :
6+ interval : " weekly"
7+
8+ - package-ecosystem : " swift"
9+ directory : " /"
10+ schedule :
11+ interval : " weekly"
Original file line number Diff line number Diff line change 1+ name : CI
2+
3+ on : [push]
4+
5+ jobs :
6+
7+ test :
8+ name : Swift ${{ matrix.swift }} on ${{ matrix.os }}
9+ strategy :
10+ matrix :
11+ os :
12+ - ubuntu-latest
13+ # - macos-latest
14+ swift : ["5.9"]
15+ runs-on : ${{ matrix.os }}
16+ steps :
17+ - uses : actions/checkout@v4
18+ - uses : ./.github/workflows/actions/setup
19+ with :
20+ swift : ${{ matrix.swift }}
21+ os : ${{ matrix.os }}
22+
23+ - run : swift build
24+ - run : swift test
Original file line number Diff line number Diff line change 1+ name : Setup
2+
3+ description : Setup for swift, cache, etc.
4+
5+ inputs :
6+ swift :
7+ required : true
8+ os :
9+ required : true
10+
11+ runs :
12+ using : ' composite'
13+ steps :
14+ - uses : swift-actions/setup-swift@v1
15+ with :
16+ swift-version : ${{ inputs.swift }}
17+
18+ - if : contains(inputs.os, 'macos')
19+ uses : irgaly/xcode-cache@v1
20+ with :
21+ key : xcode-cache-deriveddata-${{ github.workflow }}-${{ github.sha }}
22+ restore-keys : xcode-cache-deriveddata-${{ github.workflow }}-
23+ # There is no `Xcode/DerivedData`; use `.build` instead.
24+ deriveddata-directory : .build
25+
26+ # Hint: Use Composite Actions
27+ # - https://stackoverflow.com/a/75735736/9801139
28+ # - https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#example-using-a-public-action-in-a-subdirectory
29+ # - https://docs.github.com/en/actions/creating-actions/creating-a-composite-action
30+ # - https://dev.to/n3wt0n/composite-actions-vs-reusable-workflows-what-is-the-difference-github-actions-11kd
You can’t perform that action at this time.
0 commit comments