From 76c4d363ae5e879f9e76e046fbe29de5ae545117 Mon Sep 17 00:00:00 2001 From: Steven Ontong Date: Tue, 23 Jan 2024 13:40:22 +0200 Subject: [PATCH 1/9] test --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index fab4976..b11d6fe 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,6 @@ ![screenshot](https://raw.githubusercontent.com/margelo/react-native-quick-sqlite/main/header2.png) +testing
     yarn add react-native-quick-sqlite

From 3537127c4d575a25c0afff188f2b5a5902f11603 Mon Sep 17 00:00:00 2001
From: Steven Ontong 
Date: Tue, 23 Jan 2024 17:25:00 +0200
Subject: [PATCH 2/9] use older version

---
 .github/workflows/test.yaml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml
index 1843f9c..25a4c3b 100644
--- a/.github/workflows/test.yaml
+++ b/.github/workflows/test.yaml
@@ -54,7 +54,7 @@ jobs:
 
       - name: create AVD and generate snapshot for caching
         if: steps.avd-cache.outputs.cache-hit != 'true'
-        uses: reactivecircus/android-emulator-runner@v2
+        uses: reactivecircus/android-emulator-runner@v2.28.0
         with:
           api-level: 29
           force-avd-creation: false
@@ -66,7 +66,7 @@ jobs:
           script: echo "Generated AVD snapshot for caching."
 
       - name: Run connected tests
-        uses: ReactiveCircus/android-emulator-runner@v2
+        uses: ReactiveCircus/android-emulator-runner@v2.28.0
         with:
           api-level: 29
           target: google_apis

From 55000de1b5730075922546fb8b67c4b917cef0f0 Mon Sep 17 00:00:00 2001
From: Steven Ontong 
Date: Tue, 23 Jan 2024 19:39:49 +0200
Subject: [PATCH 3/9] test api 31

---
 .github/workflows/test.yaml | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml
index 25a4c3b..26717a7 100644
--- a/.github/workflows/test.yaml
+++ b/.github/workflows/test.yaml
@@ -8,7 +8,7 @@ jobs:
     name: Test
     runs-on: macos-latest
     env:
-      AVD_NAME: macOS-avd-x86_64-29
+      AVD_NAME: macOS-avd-x86_64-31
     steps:
       - uses: actions/checkout@v4
         with:
@@ -24,7 +24,7 @@ jobs:
           path: |
             ~/.android/avd/*
             ~/.android/adb*
-          key: avd-29
+          key: avd-31
 
       - name: Setup NodeJS
         uses: actions/setup-node@v2
@@ -56,7 +56,7 @@ jobs:
         if: steps.avd-cache.outputs.cache-hit != 'true'
         uses: reactivecircus/android-emulator-runner@v2.28.0
         with:
-          api-level: 29
+          api-level: 31
           force-avd-creation: false
           target: google_apis
           arch: x86_64
@@ -68,7 +68,7 @@ jobs:
       - name: Run connected tests
         uses: ReactiveCircus/android-emulator-runner@v2.28.0
         with:
-          api-level: 29
+          api-level: 31
           target: google_apis
           arch: x86_64
           avd-name: $AVD_NAME

From bcb3b62e56df919646afcf617a0690977de7850d Mon Sep 17 00:00:00 2001
From: Steven Ontong 
Date: Fri, 26 Jan 2024 10:06:38 +0200
Subject: [PATCH 4/9] use ubuntu xl

---
 .github/workflows/test.yaml | 9 ++++++++-
 tests/scripts/test.js       | 3 +++
 2 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml
index 26717a7..eebc3fe 100644
--- a/.github/workflows/test.yaml
+++ b/.github/workflows/test.yaml
@@ -6,14 +6,21 @@ on:
 jobs:
   test:
     name: Test
-    runs-on: macos-latest
+    runs-on: ubuntu-xl
     env:
+      # TODO list
       AVD_NAME: macOS-avd-x86_64-31
     steps:
       - uses: actions/checkout@v4
         with:
           persist-credentials: false
 
+      - name: Enable KVM group perms
+        run: |
+          echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
+          sudo udevadm control --reload-rules
+          sudo udevadm trigger --name-match=kvm
+
       - name: Gradle Cache
         uses: gradle/gradle-build-action@v2
 
diff --git a/tests/scripts/test.js b/tests/scripts/test.js
index cae42ec..a011b5e 100644
--- a/tests/scripts/test.js
+++ b/tests/scripts/test.js
@@ -105,11 +105,14 @@ async function getADBDeviceName(avdName) {
     .filter((line) => !!line)
     .value();
 
+  console.log('ADB DEVICES:', JSON.stringify(deviceNames));
+
   // Need to check all devices for their AVD name
   for (let deviceName of deviceNames) {
     try {
       const deviceAVDNameResponse = await spawnP(tag, `adb`, [`-s`, deviceName, `emu`, `avd`, `name`]);
       const deviceAVDName = deviceAVDNameResponse.split('\n')[0].trim();
+      console.log(`Device name for ${deviceName} is ${deviceAVDName}`);
       if (deviceAVDName == avdName) {
         return deviceName; // This device has the specified AVD name
       }

From bb6ae0823a9f296877be22ccaab5aa6591d0151c Mon Sep 17 00:00:00 2001
From: Steven Ontong 
Date: Fri, 26 Jan 2024 10:26:28 +0200
Subject: [PATCH 5/9] use latests for now

---
 .github/workflows/test.yaml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml
index eebc3fe..19a6f3a 100644
--- a/.github/workflows/test.yaml
+++ b/.github/workflows/test.yaml
@@ -6,7 +6,7 @@ on:
 jobs:
   test:
     name: Test
-    runs-on: ubuntu-xl
+    runs-on: ubuntu-latest
     env:
       # TODO list
       AVD_NAME: macOS-avd-x86_64-31

From da38dca9dd934815cfcdb072be1d3c5894c58e0a Mon Sep 17 00:00:00 2001
From: Steven Ontong 
Date: Fri, 26 Jan 2024 10:55:43 +0200
Subject: [PATCH 6/9] better emulator flags

---
 .github/workflows/test.yaml | 5 ++++-
 tests/scripts/test.js       | 3 ---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml
index 19a6f3a..aa3ca8a 100644
--- a/.github/workflows/test.yaml
+++ b/.github/workflows/test.yaml
@@ -9,7 +9,7 @@ jobs:
     runs-on: ubuntu-latest
     env:
       # TODO list
-      AVD_NAME: macOS-avd-x86_64-31
+      AVD_NAME: ubuntu-avd-x86_64-31
     steps:
       - uses: actions/checkout@v4
         with:
@@ -80,3 +80,6 @@ jobs:
           arch: x86_64
           avd-name: $AVD_NAME
           script: cd tests && yarn test --avdName $AVD_NAME
+          force-avd-creation: false
+          emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
+          disable-animations: true
diff --git a/tests/scripts/test.js b/tests/scripts/test.js
index a011b5e..cae42ec 100644
--- a/tests/scripts/test.js
+++ b/tests/scripts/test.js
@@ -105,14 +105,11 @@ async function getADBDeviceName(avdName) {
     .filter((line) => !!line)
     .value();
 
-  console.log('ADB DEVICES:', JSON.stringify(deviceNames));
-
   // Need to check all devices for their AVD name
   for (let deviceName of deviceNames) {
     try {
       const deviceAVDNameResponse = await spawnP(tag, `adb`, [`-s`, deviceName, `emu`, `avd`, `name`]);
       const deviceAVDName = deviceAVDNameResponse.split('\n')[0].trim();
-      console.log(`Device name for ${deviceName} is ${deviceAVDName}`);
       if (deviceAVDName == avdName) {
         return deviceName; // This device has the specified AVD name
       }

From d7b0ddba2a095f67eb0432ea3379c34971407cb7 Mon Sep 17 00:00:00 2001
From: Steven Ontong 
Date: Fri, 26 Jan 2024 11:23:50 +0200
Subject: [PATCH 7/9] use ubuntu-xl

---
 .github/workflows/test.yaml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml
index aa3ca8a..fd80394 100644
--- a/.github/workflows/test.yaml
+++ b/.github/workflows/test.yaml
@@ -6,7 +6,7 @@ on:
 jobs:
   test:
     name: Test
-    runs-on: ubuntu-latest
+    runs-on: ubuntu-xl
     env:
       # TODO list
       AVD_NAME: ubuntu-avd-x86_64-31

From ea0b1affe6df83334fa3596f51f291d32ab8a02f Mon Sep 17 00:00:00 2001
From: Steven Ontong 
Date: Fri, 26 Jan 2024 15:09:24 +0200
Subject: [PATCH 8/9] use ubuntu-latest

---
 .github/workflows/test.yaml | 2 +-
 README.md                   | 1 -
 2 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml
index fd80394..aa3ca8a 100644
--- a/.github/workflows/test.yaml
+++ b/.github/workflows/test.yaml
@@ -6,7 +6,7 @@ on:
 jobs:
   test:
     name: Test
-    runs-on: ubuntu-xl
+    runs-on: ubuntu-latest
     env:
       # TODO list
       AVD_NAME: ubuntu-avd-x86_64-31
diff --git a/README.md b/README.md
index b11d6fe..fab4976 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,5 @@
 ![screenshot](https://raw.githubusercontent.com/margelo/react-native-quick-sqlite/main/header2.png)
 
-testing
 
     yarn add react-native-quick-sqlite

From 4a9f93bd51f6df2da0c514a6b1843504a1cd8084 Mon Sep 17 00:00:00 2001
From: Steven Ontong 
Date: Fri, 26 Jan 2024 15:21:08 +0200
Subject: [PATCH 9/9] remove comment

---
 .github/workflows/test.yaml | 1 -
 1 file changed, 1 deletion(-)

diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml
index aa3ca8a..2686ada 100644
--- a/.github/workflows/test.yaml
+++ b/.github/workflows/test.yaml
@@ -8,7 +8,6 @@ jobs:
     name: Test
     runs-on: ubuntu-latest
     env:
-      # TODO list
       AVD_NAME: ubuntu-avd-x86_64-31
     steps:
       - uses: actions/checkout@v4