Skip to content

Commit 87e4baa

Browse files
Replace Travis with GitHub Actions to run tests on PR and master (#2743)
Also updates the badge image to reflect the new CI
1 parent 2bc8d23 commit 87e4baa

File tree

6 files changed

+49
-33
lines changed

6 files changed

+49
-33
lines changed

.github/workflows/test.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: GitUpKit Tests
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
branches:
9+
- master
10+
11+
concurrency:
12+
group: ${{ github.workflow }}-${{ github.ref }}
13+
cancel-in-progress: true
14+
15+
jobs:
16+
test:
17+
name: Run GitUpKit Tests
18+
runs-on: macos-latest
19+
20+
steps:
21+
- name: Checkout repository
22+
uses: actions/checkout@v4
23+
with:
24+
submodules: true
25+
26+
- name: Select Xcode version
27+
run: sudo xcode-select -s /Applications/Xcode.app/Contents/Developer
28+
29+
- name: Show Xcode version
30+
run: xcodebuild -version
31+
32+
- name: Run GitUpKit (macOS) tests
33+
working-directory: GitUpKit
34+
run: |
35+
xcodebuild test \
36+
-scheme "GitUpKit (macOS)" \
37+
-destination "platform=macOS" \
38+
CODE_SIGN_IDENTITY="" \
39+
CODE_SIGNING_REQUIRED=NO \
40+
CODE_SIGNING_ALLOWED=NO
41+

.travis.yml

Lines changed: 0 additions & 3 deletions
This file was deleted.

GitUpKit/Core/GCTestCase.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ @implementation GCTestCase
3131
- (void)setUp {
3232
[super setUp];
3333

34-
// Figure out if running as Xcode Server bot or under Travis CI
35-
_botMode = [NSUserName() isEqualToString:@"_xcsbuildd"] || getenv("TRAVIS");
34+
// Figure out if running via GitHub Actions. This runner value is the user used by GitHub Actions.
35+
_botMode = [NSProcessInfo.processInfo.environment[@"USER"] isEqualToString: @"runner"];
3636
}
3737

3838
- (GCRepository*)createLocalRepositoryAtPath:(NSString*)path bare:(BOOL)bare {

GitUpKit/GitUpKit.xcodeproj/xcshareddata/xcschemes/GitUpKit (macOS).xcscheme

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,11 @@
4545
BlueprintName = "Tests"
4646
ReferencedContainer = "container:GitUpKit.xcodeproj">
4747
</BuildableReference>
48+
<SkippedTests>
49+
<Test
50+
Identifier = "GCSQLiteRepositoryTests">
51+
</Test>
52+
</SkippedTests>
4853
</TestableReference>
4954
</Testables>
5055
</TestAction>

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
[![Build Status](https://travis-ci.org/git-up/GitUp.svg?branch=master)](https://travis-ci.org/git-up/GitUp)
1+
[![Build Status](https://github.com/git-up/GitUp/actions/workflows/test.yml/badge.svg?branch=master)](https://github.com/git-up/GitUp/actions/workflows/test.yml?query=branch%3Amaster)
22

33
GitUp
44
=====

travis-build.sh

Lines changed: 0 additions & 27 deletions
This file was deleted.

0 commit comments

Comments
 (0)