Skip to content
This repository has been archived by the owner on Jun 30, 2023. It is now read-only.

Commit

Permalink
Merge pull request #55 from mironal/cache-swift-format
Browse files Browse the repository at this point in the history
build if needed
  • Loading branch information
mironal committed Feb 25, 2022
2 parents 6446253 + 80f655a commit 1bef798
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion .github/workflows/swift.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,19 @@ jobs:
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
id: "cache-spm"
with:
path: BuildTools/.build
key: ${{ runner.os }}-spm-${{ hashFiles('**/BuildTools/Package.resolved') }}
restore-keys: |
${{ runner.os }}-spm-
- name: Build tools
if: steps.cache-spm.outputs.cache-hit != 'true'
run: swift build -c release --package-path BuildTools
- name: Lint
run: swift run -c release --package-path BuildTools swift-format lint -p --strict --recursive ./Sources ./Tests ./scripts
run: |
swift run -c release --skip-build --package-path BuildTools swift-format --version
swift run -c release --skip-build --package-path BuildTools swift-format lint -p --strict --recursive ./Sources ./Tests ./scripts
- name: Build
run: swift build -v
- name: Run tests
Expand Down

0 comments on commit 1bef798

Please sign in to comment.