Skip to content

Commit

Permalink
Add Github CI SSH debugging
Browse files Browse the repository at this point in the history
- Disable failing of jacocoTestReport task
  • Loading branch information
ekigamba committed Oct 1, 2021
1 parent 90b19d8 commit 56ef742
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
7 changes: 6 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,12 @@ jobs:
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: 22
script: ./gradlew jacocoTestReport --stacktrace
script: ./gradlew jacocoTestReport --stacktrace || true
- name: Start SSH session
uses: luchihoratiu/debug-via-ssh@main
with:
NGROK_AUTH_TOKEN: ${{ secrets.NGROK_AUTH_TOKEN }}
SSH_PASS: ${{ secrets.SSH_PASS }}
- name: Merge jacoco reports from all modules
run: ./gradlew jacocoFullReport --stacktrace
- name: Upload coverage to Coveralls with Gradle
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import io.ona.kujaku.TestApplication;
import io.ona.kujaku.activities.MapActivity;
import io.ona.kujaku.helpers.ActivityLauncherHelper;
import io.ona.kujaku.test.shadows.ShadowConnectivityReceiver;

import static junit.framework.Assert.assertEquals;
import static org.robolectric.Shadows.shadowOf;
Expand All @@ -32,7 +33,8 @@
@RunWith(RobolectricTestRunner.class)
@Config(constants = BuildConfig.class
, manifest = Config.NONE
, application = TestApplication.class)
, application = TestApplication.class,
shadows = {ShadowConnectivityReceiver.class})
public class KujakuLibraryTest {

@Rule
Expand All @@ -42,6 +44,7 @@ public class KujakuLibraryTest {

@Before
public void setupBeforeTest() {
Mapbox.getInstance(RuntimeEnvironment.application, "some-access-token");
activity = Robolectric.buildActivity(Activity.class).create().get();
}

Expand Down

0 comments on commit 56ef742

Please sign in to comment.