Skip to content

Commit

Permalink
ci: add e2e chrome test
Browse files Browse the repository at this point in the history
  • Loading branch information
PiTrem committed Jul 16, 2024
1 parent 68a362b commit 2df01d0
Showing 1 changed file with 32 additions and 21 deletions.
53 changes: 32 additions & 21 deletions .github/workflows/flutter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,31 @@ on:
branches: [ "main" ]

jobs:
integration-test:
name: Run Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: subosito/flutter-action@v2
with:
channel: stable
flutter-version: '3.22.2'
- run: flutter pub get
- run: flutter config --enable-web
- run: sudo apt-get -y install xvfb xorg gtk2-engines-pixbuf
- name: test
env:
TEST_INSTANCE_URL: ${{ secrets.TEST_INSTANCE_URL }}
run: |
chromedriver --port=4444 &
flutter drive \
[email protected] \
--dart-define=ELN_PASSWORD=@complat \
--dart-define=ELN_URL=$TEST_INSTANCE_URL \
--driver=test_driver/integration_test.dart \
--target=integration_test/app_test.dart \
-d web-server --browser-name=chrome --web-browser-flag "--disable-web-security --headless" --headless
build:
runs-on: ubuntu-latest

Expand All @@ -30,37 +55,23 @@ jobs:
echo flutter.targetSdkVersion=33 >> ./android/local.properties
echo flutter.compileSdkVersion=33 >> ./android/local.properties
- name: test
env:
TEST_INSTANCE_URL: ${{ secrets.TEST_INSTANCE_URL }}
run: |
echo "no testing"
# flutter packages pub run build_runner build
# flutter drive \
# [email protected] \
# --dart-define=ELN_PASSWORD=@complat \
# --dart-define=ELN_URL=$TEST_INSTANCE_URL
# --driver=test_driver/integration_test.dart \
# --target=integration_test/app_test.dart
- name: set key properties
# keyPassword="${{ secrets.KEY_PASSWORD }}"
# storePassword="${{ secrets.STORE_PASSWORD }}"
# keyAlias="${{ secrets.KEY_ALIAS }}
# storeFile=keystore.jks
run: |
echo keyPassword="${{ secrets.KEY_PASSWORD }}" > ./android/key.properties
echo storePassword="${{ secrets.STORE_PASSWORD }}" >> ./android/key.properties
echo keyAlias="${{ secrets.KEY_ALIAS }}" >> ./android/key.properties
echo storeFile=keystore.jks >> ./android/key.properties
echo "keyPassword=${{ secrets.KEY_PASSWORD }}" > ./android/key.properties
echo "storePassword=${{ secrets.STORE_PASSWORD }}" >> ./android/key.properties
echo "keyAlias=${{ secrets.KEY_ALIAS }}" >> ./android/key.properties
echo "storeFile=keystore.jks" >> ./android/key.properties
echo "${{ secrets.KEY_JKS }}" | base64 --decode > ./android/app/keystore.jks
echo
# - run: flutter build apk

- run: flutter build appbundle

- name: Upload artefact
- name: Upload aab artefact
uses: actions/upload-artifact@v4
with:
name: appbundle
Expand Down

0 comments on commit 2df01d0

Please sign in to comment.