Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use make commands on the CI so it actually fails #286

Merged
merged 3 commits into from
Sep 30, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 14 additions & 21 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,41 +11,34 @@ on:
- master

jobs:
build:
name: Build
test:
name: Test
runs-on: macOS-latest
strategy:
matrix:
platform: ['iOS Simulator,name=iPhone 8']
steps:
- uses: actions/checkout@v1
- name: Analyze and Test
run: |
xcodebuild clean analyze test \
-destination "platform=${{ matrix.platform }}" \
-sdk "iphonesimulator" \
-project PINCache.xcodeproj \
-scheme PINCache \
ONLY_ACTIVE_ARCH=NO \
CODE_SIGNING_REQUIRED=NO \
CLANG_ANALYZER_OUTPUT=plist-html \
CLANG_ANALYZER_OUTPUT_DIR="$(pwd)/clang" \
| xcpretty
if [[ -n `find $(pwd)/clang -name "*.html"` ]] ; then rm -rf $(pwd)/clang; exit 1; fi
rm -rf $(pwd)/clang
- name: Test
run: make test
analyze:
name: Analyze
runs-on: macOS-latest
steps:
- uses: actions/checkout@v1
- name: analyze
run: make analyze
cocoapods:
name: CocoaPods
runs-on: macOS-latest
steps:
- uses: actions/checkout@v1
- name: Lint
run: pod lib lint
run: make cocoapods
carthage:
name: Carthage
runs-on: macOS-latest
steps:
- uses: actions/checkout@v1
- name: Update
run: carthage update --no-use-binaries --no-build
- name: Build
run: carthage build --no-skip-current
- name: carthage
run: make carthage
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ PLATFORM="platform=iOS Simulator,name=iPhone 8"
SDK="iphonesimulator"
SHELL=/bin/bash -o pipefail

.PHONY: all lint test carthage analyze
.PHONY: all cocoapods test carthage analyze

lint:
cocoapods:
pod lib lint

analyze:
Expand All @@ -25,4 +25,4 @@ carthage:
carthage update --no-use-binaries --no-build
carthage build --no-skip-current

all: carthage lint test analyze
all: carthage cocoapods test analyze
12 changes: 6 additions & 6 deletions Tests/PINCacheTests.m
Original file line number Diff line number Diff line change
Expand Up @@ -735,13 +735,13 @@ - (void)testAgeLimit
}];

dispatch_group_enter(group);
[self.cache.diskCache objectForKeyAsync:key1 completion:^(id<PINCaching> cache, NSString *key, id<NSCoding> object) {
[self.cache.diskCache objectForKeyAsync:key1 completion:^(PINDiskCache * _Nonnull cache, NSString * _Nonnull key, id<NSCoding> _Nullable object) {
diskObj1 = object;
dispatch_group_leave(group);
}];

dispatch_group_enter(group);
[self.cache.diskCache objectForKeyAsync:key2 completion:^(id<PINCaching> cache, NSString *key, id<NSCoding> object) {
[self.cache.diskCache objectForKeyAsync:key2 completion:^(PINDiskCache * _Nonnull cache, NSString * _Nonnull key, id<NSCoding> _Nullable object) {
diskObj2 = object;
dispatch_group_leave(group);
}];
Expand Down Expand Up @@ -778,13 +778,13 @@ - (void)testAgeLimit
}];

dispatch_group_enter(group);
[self.cache.diskCache objectForKeyAsync:key1 completion:^(id<PINCaching> cache, NSString *key, id<NSCoding> object) {
[self.cache.diskCache objectForKeyAsync:key1 completion:^(PINDiskCache * _Nonnull cache, NSString * _Nonnull key, id<NSCoding> _Nullable object) {
diskObj1 = object;
dispatch_group_leave(group);
}];

dispatch_group_enter(group);
[self.cache.diskCache objectForKeyAsync:key2 completion:^(PINDiskCache *cache, NSString *key, id<NSCoding> object) {
[self.cache.diskCache objectForKeyAsync:key2 completion:^(PINDiskCache * _Nonnull cache, NSString * _Nonnull key, id<NSCoding> _Nullable object) {
diskObj2 = object;
dispatch_group_leave(group);
}];
Expand Down Expand Up @@ -909,7 +909,7 @@ - (void)_testTTLCacheObjectAccess {
}];

dispatch_group_enter(group);
[self.cache.diskCache objectForKeyAsync:key completion:^(id<PINCaching> cache, NSString *key, id<NSCoding> object) {
[self.cache.diskCache objectForKeyAsync:key completion:^(PINDiskCache * _Nonnull cache, NSString * _Nonnull key, id<NSCoding> _Nullable object) {
diskObj = object;
dispatch_group_leave(group);
}];
Expand All @@ -933,7 +933,7 @@ - (void)_testTTLCacheObjectAccess {
}];

dispatch_group_enter(group);
[self.cache.diskCache objectForKeyAsync:key completion:^(id<PINCaching> cache, NSString *key, id<NSCoding> object) {
[self.cache.diskCache objectForKeyAsync:key completion:^(PINDiskCache * _Nonnull cache, NSString * _Nonnull key, id<NSCoding> _Nullable object) {
diskObj = object;
dispatch_group_leave(group);
}];
Expand Down