From 3930b107f8deed1309fa1549e4dda12ae802187e Mon Sep 17 00:00:00 2001 From: Sina <65910646+SinaSeylani@users.noreply.github.com> Date: Wed, 15 Jan 2025 11:46:11 -0700 Subject: [PATCH 01/13] NPM packages updated --- integrationtestapp/proxy-server/package-lock.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/integrationtestapp/proxy-server/package-lock.json b/integrationtestapp/proxy-server/package-lock.json index 972b8eb..2aadf95 100644 --- a/integrationtestapp/proxy-server/package-lock.json +++ b/integrationtestapp/proxy-server/package-lock.json @@ -10,7 +10,7 @@ "license": "ISC", "dependencies": { "axios": "^1.7.4", - "express": "^4.19.2" + "express": "^4.21.2" } }, "node_modules/accepts": { @@ -46,7 +46,7 @@ } }, "node_modules/body-parser": { - "version": "1.20.2", + "version": "1.20.3", "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.2.tgz", "integrity": "sha512-ml9pReCu3M61kGlqoTm2umSXTlRTuGTx0bfYj+uIUKKYycG5NtSbeetV3faSU6R7ajOPw0g/J1PvK4qNy7s5bA==", "dependencies": { @@ -125,7 +125,7 @@ } }, "node_modules/cookie": { - "version": "0.6.0", + "version": "1.0.2", "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.6.0.tgz", "integrity": "sha512-U71cyTamuh1CRNCfpGY6to28lxvNwPG4Guz/EVjgf3Jmzv0vlDp1atT9eS5dDjMYHucpHbWns6Lwf3BKz6svdw==", "engines": { @@ -255,12 +255,12 @@ "methods": "~1.1.2", "on-finished": "2.4.1", "parseurl": "~1.3.3", - "path-to-regexp": "0.1.7", + "path-to-regexp": "0.1.10", "proxy-addr": "~2.0.7", "qs": "6.11.0", "range-parser": "~1.2.1", "safe-buffer": "5.2.1", - "send": "0.18.0", + "send": "0.19.1", "serve-static": "1.15.0", "setprototypeof": "1.2.0", "statuses": "2.0.1", @@ -659,7 +659,7 @@ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" }, "node_modules/serve-static": { - "version": "1.15.0", + "version": "1.16.2", "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.15.0.tgz", "integrity": "sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g==", "dependencies": { From 8cb702cbb484ef6478b25ee5fbf0974882f27063 Mon Sep 17 00:00:00 2001 From: Sina <65910646+SinaSeylani@users.noreply.github.com> Date: Wed, 15 Jan 2025 12:04:02 -0700 Subject: [PATCH 02/13] web tests workflow updated --- .github/workflows/integration-tests.yml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index 0824501..c2a9ad7 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -29,12 +29,23 @@ jobs: flutter pub get working-directory: ./integrationtestapp + - name: Set up Chrome Dependencies + run: | + sudo apt-get update + sudo apt-get install --no-install-recommends -y \ + libglib2.0-0 libatk1.0-0 libatk-bridge2.0-0 libgdk-pixbuf2.0-0 \ + libgtk-3-0 libgbm-dev libnss3-dev libxss-dev libasound2t64 \ + xvfb fonts-liberation libu2f-udev xdg-utils + wget http://mirrors.kernel.org/ubuntu/pool/universe/g/gconf/libgconf-2-4_3.2.6-6ubuntu1_amd64.deb + sudo dpkg -i libgconf-2-4_3.2.6-6ubuntu1_amd64.deb || true + sudo apt-get install -f -y + - name: Set up Google Chrome and ChromeDriver uses: browser-actions/setup-chrome@v1 with: chrome-version: 129 install-chromedriver: true - install-dependencies: true + install-dependencies: false - name: Start Xvfb run: | From 9475c6b026e3e4bada62f4805550bc615e36727c Mon Sep 17 00:00:00 2001 From: Sina <65910646+SinaSeylani@users.noreply.github.com> Date: Wed, 15 Jan 2025 12:09:26 -0700 Subject: [PATCH 03/13] Chrome driver version updated --- .github/workflows/integration-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index c2a9ad7..9efef9f 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -43,7 +43,7 @@ jobs: - name: Set up Google Chrome and ChromeDriver uses: browser-actions/setup-chrome@v1 with: - chrome-version: 129 + chrome-version: 131 install-chromedriver: true install-dependencies: false From fcfa7eefe294cdcacb2f2b0a89365aa0a91b4ad1 Mon Sep 17 00:00:00 2001 From: Sina <65910646+SinaSeylani@users.noreply.github.com> Date: Wed, 15 Jan 2025 12:26:25 -0700 Subject: [PATCH 04/13] android pipeline updated --- .github/workflows/integration-tests.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index 9efef9f..58d9b5d 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -112,8 +112,8 @@ jobs: - name: Start emulator and run tests uses: reactivecircus/android-emulator-runner@v2 with: - api-level: 34 - target: google_apis + api-level: ${{ matrix.api-level }} + target: ${{ matrix.target }} build-tools: 34.0.0 arch: x86_64 profile: Nexus 6 From 1fc9b23236d92cc728343c756a58a8d32716f9d8 Mon Sep 17 00:00:00 2001 From: Sina <65910646+SinaSeylani@users.noreply.github.com> Date: Wed, 15 Jan 2025 12:38:15 -0700 Subject: [PATCH 05/13] android pipeline updated --- .github/workflows/integration-tests.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index 58d9b5d..fd2fdcd 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -114,7 +114,6 @@ jobs: with: api-level: ${{ matrix.api-level }} target: ${{ matrix.target }} - build-tools: 34.0.0 arch: x86_64 profile: Nexus 6 working-directory: ./integrationtestapp From 2246c4a3182584d5a33c0c287729e0d5175e0194 Mon Sep 17 00:00:00 2001 From: Sina <65910646+SinaSeylani@users.noreply.github.com> Date: Wed, 15 Jan 2025 12:54:42 -0700 Subject: [PATCH 06/13] android pipeline updated --- .github/workflows/integration-tests.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index fd2fdcd..874b2a5 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -112,10 +112,12 @@ jobs: - name: Start emulator and run tests uses: reactivecircus/android-emulator-runner@v2 with: - api-level: ${{ matrix.api-level }} + api-level: 35 target: ${{ matrix.target }} arch: x86_64 profile: Nexus 6 + force-avd-creation: true + emulator-boot-timeout: 600 working-directory: ./integrationtestapp script: flutter test integration_test/*.dart -d emulator-5554 --dart-define=MAILOSAUR_API_KEY=${{ secrets.MAILOSAUR_API_KEY }} From 6520ad64549bd78c6c1e54a52d82aeb1d50545b4 Mon Sep 17 00:00:00 2001 From: Sina <65910646+SinaSeylani@users.noreply.github.com> Date: Wed, 15 Jan 2025 13:03:03 -0700 Subject: [PATCH 07/13] android pipeline updated --- .github/workflows/integration-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index 874b2a5..5f64b91 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -113,7 +113,7 @@ jobs: uses: reactivecircus/android-emulator-runner@v2 with: api-level: 35 - target: ${{ matrix.target }} + target: google_apis arch: x86_64 profile: Nexus 6 force-avd-creation: true From 8855a5acfcdbd6abc6ab292c9cd598af8477698e Mon Sep 17 00:00:00 2001 From: Sina <65910646+SinaSeylani@users.noreply.github.com> Date: Wed, 15 Jan 2025 13:13:25 -0700 Subject: [PATCH 08/13] android pipeline updated --- .github/workflows/integration-tests.yml | 78 +++---------------------- 1 file changed, 9 insertions(+), 69 deletions(-) diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index 5f64b91..c82126a 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -5,74 +5,6 @@ on: branches: [ "main" ] jobs: - web-tests: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v4 - - - name: Set up Flutter - uses: subosito/flutter-action@v2 - with: - flutter-version: '3.22.1' - - - name: Install Node.js - uses: actions/setup-node@v3 - with: - node-version: '16' - - - name: Install dependencies - run: | - cd proxy-server - npm install - cd ../.. - flutter pub get - working-directory: ./integrationtestapp - - - name: Set up Chrome Dependencies - run: | - sudo apt-get update - sudo apt-get install --no-install-recommends -y \ - libglib2.0-0 libatk1.0-0 libatk-bridge2.0-0 libgdk-pixbuf2.0-0 \ - libgtk-3-0 libgbm-dev libnss3-dev libxss-dev libasound2t64 \ - xvfb fonts-liberation libu2f-udev xdg-utils - wget http://mirrors.kernel.org/ubuntu/pool/universe/g/gconf/libgconf-2-4_3.2.6-6ubuntu1_amd64.deb - sudo dpkg -i libgconf-2-4_3.2.6-6ubuntu1_amd64.deb || true - sudo apt-get install -f -y - - - name: Set up Google Chrome and ChromeDriver - uses: browser-actions/setup-chrome@v1 - with: - chrome-version: 131 - install-chromedriver: true - install-dependencies: false - - - name: Start Xvfb - run: | - sudo apt-get install -y xvfb - export DISPLAY=:99 - sudo Xvfb -ac :99 -screen 0 1280x1024x24 > /dev/null 2>&1 & - - - name: Start ChromeDriver - run: | - nohup chromedriver --port=4444 & - sleep 5 - - - name: Start Proxy Server - run: | - nohup node integrationtestapp/proxy-server/proxy_server.js & - sleep 5 - env: - MAILOSAUR_API_KEY: ${{ secrets.MAILOSAUR_API_KEY }} - - - name: Run Web tests with XVFB - run: | - for test in integration_test/*.dart; do - xvfb-run --auto-servernum --server-args="-screen 0 1280x1024x24" flutter drive --driver=test_driver/integration_test.dart --target=$test -d chrome --web-port=4200 --dart-define=MAILOSAUR_API_KEY=${{ secrets.MAILOSAUR_API_KEY }} - done - working-directory: ./integrationtestapp - env: - MAILOSAUR_API_KEY: ${{ secrets.MAILOSAUR_API_KEY }} android-tests: runs-on: ubuntu-latest @@ -86,7 +18,7 @@ jobs: uses: actions/setup-java@v3 with: distribution: 'zulu' - java-version: '11' + java-version: '17' - name: Set up Flutter uses: subosito/flutter-action@v2 @@ -109,6 +41,14 @@ jobs: run: | echo "export MAILOSAUR_API_KEY=${{ secrets.MAILOSAUR_API_KEY }}" >> $GITHUB_ENV + - name: Install Android SDK + run: | + yes | sdkmanager --licenses > /dev/null + sdkmanager "platform-tools" "platforms;android-35" "system-images;android-35;google_apis;x86_64" + + - name: Add adb to PATH + run: echo "$ANDROID_HOME/platform-tools" >> $GITHUB_PATH + - name: Start emulator and run tests uses: reactivecircus/android-emulator-runner@v2 with: From 9f9740cbf71763fc3eacb6cebbb9f602a8ecb6ee Mon Sep 17 00:00:00 2001 From: Sina <65910646+SinaSeylani@users.noreply.github.com> Date: Wed, 15 Jan 2025 13:15:36 -0700 Subject: [PATCH 09/13] android pipeline updated --- .github/workflows/integration-tests.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index c82126a..77d561b 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -5,10 +5,8 @@ on: branches: [ "main" ] jobs: - android-tests: runs-on: ubuntu-latest - needs: web-tests steps: - name: Checkout From 3f9c96785f19767ea6861045a170a5a963135ae5 Mon Sep 17 00:00:00 2001 From: Sina <65910646+SinaSeylani@users.noreply.github.com> Date: Wed, 15 Jan 2025 13:21:19 -0700 Subject: [PATCH 10/13] android pipeline updated --- .github/workflows/integration-tests.yml | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index 77d561b..f8cf09c 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -29,6 +29,21 @@ jobs: sudo udevadm control --reload-rules sudo udevadm trigger --name-match=kvm + - name: Install Android Command Line Tools + run: | + mkdir -p $HOME/android-sdk/cmdline-tools + curl -o commandlinetools.zip https://dl.google.com/android/repository/commandlinetools-linux-9477386_latest.zip + unzip commandlinetools.zip -d $HOME/android-sdk/cmdline-tools + mv $HOME/android-sdk/cmdline-tools/cmdline-tools $HOME/android-sdk/cmdline-tools/latest + echo "export ANDROID_HOME=$HOME/android-sdk" >> $GITHUB_ENV + echo "export PATH=$ANDROID_HOME/cmdline-tools/latest/bin:$ANDROID_HOME/platform-tools:$PATH" >> $GITHUB_ENV + echo "export PATH=$PATH:$ANDROID_HOME/cmdline-tools/latest/bin:$ANDROID_HOME/platform-tools" >> $GITHUB_PATH + + - name: Accept SDK Licenses and Install Tools + run: | + yes | sdkmanager --licenses + sdkmanager "platform-tools" "platforms;android-35" "system-images;android-35;google_apis;x86_64" + - name: Install dependencies run: flutter pub get working-directory: ./integrationtestapp @@ -39,14 +54,6 @@ jobs: run: | echo "export MAILOSAUR_API_KEY=${{ secrets.MAILOSAUR_API_KEY }}" >> $GITHUB_ENV - - name: Install Android SDK - run: | - yes | sdkmanager --licenses > /dev/null - sdkmanager "platform-tools" "platforms;android-35" "system-images;android-35;google_apis;x86_64" - - - name: Add adb to PATH - run: echo "$ANDROID_HOME/platform-tools" >> $GITHUB_PATH - - name: Start emulator and run tests uses: reactivecircus/android-emulator-runner@v2 with: From 4c5dc1c3fd408361f218a86f6ad8c957cd5ebad5 Mon Sep 17 00:00:00 2001 From: Sina <65910646+SinaSeylani@users.noreply.github.com> Date: Wed, 15 Jan 2025 13:35:59 -0700 Subject: [PATCH 11/13] android pipeline updated --- .github/workflows/integration-tests.yml | 57 +++++++++++++++++++++++++ 1 file changed, 57 insertions(+) diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index f8cf09c..e6d69a4 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -5,8 +5,65 @@ on: branches: [ "main" ] jobs: + web-tests: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - name: Set up Flutter + uses: subosito/flutter-action@v2 + with: + flutter-version: '3.22.1' + + - name: Install Node.js + uses: actions/setup-node@v3 + with: + node-version: '16' + + - name: Install dependencies + run: | + cd proxy-server + npm install + cd ../.. + flutter pub get + working-directory: ./integrationtestapp + + - name: Set up Google Chrome and ChromeDriver + uses: browser-actions/setup-chrome@v1 + with: + chrome-version: 129 + install-chromedriver: true + install-dependencies: true + + - name: Start Xvfb + run: | + sudo apt-get install -y xvfb + export DISPLAY=:99 + sudo Xvfb -ac :99 -screen 0 1280x1024x24 > /dev/null 2>&1 & + - name: Start ChromeDriver + run: | + nohup chromedriver --port=4444 & + sleep 5 + - name: Start Proxy Server + run: | + nohup node integrationtestapp/proxy-server/proxy_server.js & + sleep 5 + env: + MAILOSAUR_API_KEY: ${{ secrets.MAILOSAUR_API_KEY }} + + - name: Run Web tests with XVFB + run: | + for test in integration_test/*.dart; do + xvfb-run --auto-servernum --server-args="-screen 0 1280x1024x24" flutter drive --driver=test_driver/integration_test.dart --target=$test -d chrome --web-port=4200 --dart-define=MAILOSAUR_API_KEY=${{ secrets.MAILOSAUR_API_KEY }} + done + working-directory: ./integrationtestapp + env: + MAILOSAUR_API_KEY: ${{ secrets.MAILOSAUR_API_KEY }} + android-tests: runs-on: ubuntu-latest + needs: web-tests steps: - name: Checkout From 09d45aa19dafd6d09e2a4380d56bc52d0c821e30 Mon Sep 17 00:00:00 2001 From: Sina <65910646+SinaSeylani@users.noreply.github.com> Date: Wed, 15 Jan 2025 13:39:33 -0700 Subject: [PATCH 12/13] web workflow updated --- .github/workflows/integration-tests.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index e6d69a4..ece1305 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -32,7 +32,7 @@ jobs: - name: Set up Google Chrome and ChromeDriver uses: browser-actions/setup-chrome@v1 with: - chrome-version: 129 + chrome-version: 131 install-chromedriver: true install-dependencies: true @@ -60,7 +60,7 @@ jobs: working-directory: ./integrationtestapp env: MAILOSAUR_API_KEY: ${{ secrets.MAILOSAUR_API_KEY }} - + android-tests: runs-on: ubuntu-latest needs: web-tests From fdd8bdf958e414e579537182a768c36592fa9d5f Mon Sep 17 00:00:00 2001 From: Sina <65910646+SinaSeylani@users.noreply.github.com> Date: Wed, 15 Jan 2025 13:42:00 -0700 Subject: [PATCH 13/13] web workflow updated --- .github/workflows/integration-tests.yml | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index ece1305..4cd1964 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -29,22 +29,35 @@ jobs: flutter pub get working-directory: ./integrationtestapp + - name: Set up Chrome Dependencies + run: | + sudo apt-get update + sudo apt-get install --no-install-recommends -y \ + libglib2.0-0 libatk1.0-0 libatk-bridge2.0-0 libgdk-pixbuf2.0-0 \ + libgtk-3-0 libgbm-dev libnss3-dev libxss-dev libasound2t64 \ + xvfb fonts-liberation libu2f-udev xdg-utils + wget http://mirrors.kernel.org/ubuntu/pool/universe/g/gconf/libgconf-2-4_3.2.6-6ubuntu1_amd64.deb + sudo dpkg -i libgconf-2-4_3.2.6-6ubuntu1_amd64.deb || true + sudo apt-get install -f -y + - name: Set up Google Chrome and ChromeDriver uses: browser-actions/setup-chrome@v1 with: chrome-version: 131 install-chromedriver: true - install-dependencies: true + install-dependencies: false - name: Start Xvfb run: | sudo apt-get install -y xvfb export DISPLAY=:99 sudo Xvfb -ac :99 -screen 0 1280x1024x24 > /dev/null 2>&1 & + - name: Start ChromeDriver run: | nohup chromedriver --port=4444 & sleep 5 + - name: Start Proxy Server run: | nohup node integrationtestapp/proxy-server/proxy_server.js &