Skip to content

Commit

Permalink
use make test
Browse files Browse the repository at this point in the history
  • Loading branch information
taji-taji committed Sep 3, 2022
1 parent 960c924 commit 67c2c28
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 4 deletions.
34 changes: 31 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,19 +30,33 @@ jobs:
id: get-swift-version
run: |
echo "::set-output name=version::$(swift -version | head -n 1 | sed s/,// )"
- name: Cache DevTools
uses: actions/cache@v2
with:
path: |
./DevTools/.build/release
key: ${{ runner.os }}-DevTools-${{ matrix.xcode }}-${{ hashFiles('./DevTools/Package.resolved') }}
restore-keys: |
${{ runner.os }}-DevTools-${{ matrix.xcode }}-${{ hashFiles('./DevTools/Package.resolved') }}
${{ runner.os }}-DevTools-${{ matrix.xcode }}-
- name: Install DevTools
run: |
if [ ! -e ./DevTools/.build/release/xcbeautify ]; then
make dev
fi
- name: Cache dependencies
uses: actions/cache@v2
with:
path: |
.build/artifacts
.build/checkouts
.build/repositories
key: ${{ runner.os }}-dependencies-${{ matrix.xcode }}-${{ hashFiles('**/Package.resolved') }}
key: ${{ runner.os }}-dependencies-${{ matrix.xcode }}-${{ hashFiles('./Package.resolved') }}
restore-keys: |
${{ runner.os }}-dependencies-${{ matrix.xcode }}-${{ hashFiles('**/Package.resolved') }}
${{ runner.os }}-dependencies-${{ matrix.xcode }}-${{ hashFiles('./Package.resolved') }}
${{ runner.os }}-dependencies-${{ matrix.xcode }}-
- name: Test
run: swift test
run: make test
linux:
strategy:
fail-fast: false
Expand All @@ -66,6 +80,20 @@ jobs:
run: |
echo "::set-output name=version::$(swift -version | head -n 1 | sed s/,// )"
shell: bash
- name: Cache DevTools
uses: actions/cache@v2
with:
path: |
./DevTools/.build/release
key: ${{ matrix.cache-version }}-${{ runner.os }}-${{ steps.get-swift-version.outputs.version }}}-DevTools-${{ hashFiles('./DevTools/Package.resolved') }}
restore-keys: |
${{ matrix.cache-version }}-${{ runner.os }}-${{ steps.get-swift-version.outputs.version }}}-DevTools-${{ hashFiles('./DevTools/Package.resolved') }}
${{ matrix.cache-version }}-${{ runner.os }}-${{ steps.get-swift-version.outputs.version }}}-DevTools-
- name: Install DevTools
run: |
if [ ! -e ./DevTools/.build/release/xcbeautify ]; then
make dev
fi
- name: Cache dependencies
uses: actions/cache@v2
with:
Expand Down
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
SWIFT = $(shell which swift)
DEV_TOOLS_BUILD_FLAGS = --configuration release --package-path ./DevTools
XCBEAUTIFY_EXECUTABLE = ./DevTools/.build/release/xcbeautify

.PHONY: dev
dev:
$(SWIFT) build $(DEV_TOOLS_BUILD_FLAGS) --product xcbeautify

.PHONY: test
test:
$(SWIFT) test 2>&1 | xcbeautify
$(SWIFT) test 2>&1 | $(XCBEAUTIFY_EXECUTABLE)

0 comments on commit 67c2c28

Please sign in to comment.