Skip to content

Commit fb15800

Browse files
authored
Merge branch 'master' into SDK-205-Prepare-for-3.6.3
2 parents 05b8eac + 97f1b82 commit fb15800

File tree

6 files changed

+769
-64
lines changed

6 files changed

+769
-64
lines changed

.github/workflows/codeql.yml

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -7,59 +7,59 @@ on:
77
branches: [ "master" ]
88

99
jobs:
10-
analyze:
10+
analyze-java:
1111
name: Analyze Java
12-
runs-on: ubuntu-latest
12+
runs-on: 'ubuntu-latest'
1313
permissions:
14-
# required for all workflows
1514
security-events: write
16-
17-
# required to fetch internal or private CodeQL packsCodeQ
1815
packages: read
19-
20-
# only required for workflows in private repositories
2116
actions: read
2217
contents: read
2318

19+
2420
strategy:
2521
fail-fast: false
2622
matrix:
2723
include:
28-
- language: java-kotlin
24+
- language: java
2925
build-mode: autobuild
26+
3027
steps:
3128
- name: Checkout repository
3229
uses: actions/checkout@v4
30+
with:
31+
fetch-depth: '0'
3332

3433
- name: Initialize CodeQL
35-
uses: github/codeql-action/init@v3
34+
uses: github/codeql-action/init@v4
3635
with:
37-
languages: ${{ matrix.language }}
38-
build-mode: ${{ matrix.build-mode }}
39-
# If you wish to specify custom queries, you can do so here or in a config file.
40-
# By default, queries listed here will override any specified in a config file.
41-
# Prefix the list here with "+" to use these queries and those in the config file.
36+
languages: java
37+
queries: security-extended,security-and-quality
38+
39+
- name: Configure JDK
40+
uses: actions/setup-java@d202f5dbf7256730fb690ec59f6381650114feb2 # v1.4.3
41+
with:
42+
java-version: 17
43+
44+
- name: Setup Google Services Configuration
45+
run: |
46+
echo "Setting up Google Services configuration for CI..."
47+
# Ensure the google-services.json file exists for the build
48+
if [ ! -f "integration-tests/google-services.json" ]; then
49+
echo "Creating google-services.json from template..."
50+
cp integration-tests/google-services.json.template integration-tests/google-services.json
51+
fi
52+
echo "Google Services configuration ready"
4253
43-
# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
44-
queries: ${{ matrix.language == 'java-kotlin' && 'security-extended, security-and-quality' }}
54+
- run: touch local.properties
4555

46-
# If the analyze step fails for one of the languages you are analyzing with
47-
# "We were unable to automatically build your code", modify the matrix above
48-
# to set the build mode to "manual" for that language. Then modify this step
49-
# to build your code.
50-
# ℹ️ Command-line programs to run using the OS shell.
51-
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
52-
- if: matrix.build-mode == 'manual'
53-
shell: bash
56+
- name: CodeQL Manual Build (Disable Daemon & Trace)
5457
run: |
55-
echo 'If you are using a "manual" build mode for one or more of the' \
56-
'languages you are analyzing, replace this with the commands to build' \
57-
'your code, for example:'
58-
echo ' make bootstrap'
59-
echo ' make release'
60-
exit 1
58+
CODEQL_BIN="/opt/hostedtoolcache/CodeQL/2.23.6/x64/codeql/codeql"
59+
DB_PATH="/home/runner/work/_temp/codeql_databases/java"
60+
./gradlew assembleRelease --no-daemon -x test -x lint
6161
6262
- name: Perform CodeQL Analysis
63-
uses: github/codeql-action/analyze@v3
63+
uses: github/codeql-action/analyze@v4
6464
with:
65-
category: "/language:${{matrix.language}}"
65+
category: "/language:${{matrix.language}}"

iterableapi/src/androidTest/java/com/iterable/iterableapi/IterableApiResponseTest.java

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,14 @@ public class IterableApiResponseTest {
3737
private MockWebServer server;
3838

3939
@Before
40-
public void setUp() {
40+
public void setUp() throws IOException {
4141
server = new MockWebServer();
42+
// Explicitly start the server to ensure it's ready
43+
try {
44+
server.start();
45+
} catch (IllegalStateException e) {
46+
// Server may already be started by url() call below, which is fine
47+
}
4248
IterableApi.overrideURLEndpointPath(server.url("").toString());
4349
createIterableApi();
4450
}
@@ -138,7 +144,7 @@ public void onFailure(@NonNull String reason, @Nullable JSONObject data) {
138144
new IterableRequestTask().execute(request);
139145

140146
server.takeRequest(5, TimeUnit.SECONDS);
141-
assertTrue("onFailure is called", signal.await(1, TimeUnit.SECONDS));
147+
assertTrue("onFailure is called", signal.await(5, TimeUnit.SECONDS));
142148
}
143149

144150

0 commit comments

Comments
 (0)