Skip to content

Commit 52f020b

Browse files
committed
Use Github Actions for running tests
1 parent aefc8c5 commit 52f020b

File tree

3 files changed

+44
-32
lines changed

3 files changed

+44
-32
lines changed

.github/workflows/test.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Run Tests
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- master
7+
push:
8+
branches:
9+
- master
10+
11+
jobs:
12+
test:
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- name: Checkout repository
17+
uses: actions/checkout@v4
18+
19+
- name: Set up JDK 17
20+
uses: actions/setup-java@v4
21+
with:
22+
distribution: 'temurin'
23+
java-version: '17'
24+
cache: 'gradle'
25+
26+
- name: Setup Android SDK
27+
uses: android-actions/setup-android@v3
28+
29+
- name: Grant execute permission for gradlew
30+
run: chmod +x gradlew
31+
32+
- name: Run tests
33+
run: ./gradlew clean build lint test
34+
35+
- name: Upload test results
36+
if: always()
37+
uses: actions/upload-artifact@v4
38+
with:
39+
name: test-results
40+
path: |
41+
**/build/reports/tests/
42+
**/build/test-results/
43+
retention-days: 30

.travis.yml

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

auth-lib/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ android {
8282
}
8383
}
8484

85-
def manifestPlaceholdersForTests = [redirectSchemeName: "spotify-sdk", redirectHostName: "auth"]
85+
def manifestPlaceholdersForTests = [redirectSchemeName: "spotify-sdk", redirectHostName: "auth", redirectPathPattern: "/.*"]
8686
namespace 'com.spotify.sdk.android.auth'
8787
unitTestVariants.configureEach {
8888
it.mergedFlavor.manifestPlaceholders += manifestPlaceholdersForTests

0 commit comments

Comments
 (0)