From ece7a8dead9a6027d9283112cfd6ef6f4ad2e75b Mon Sep 17 00:00:00 2001 From: Hjort Date: Fri, 1 Dec 2023 13:18:12 +0100 Subject: [PATCH] Fix integration-tests workflow --- .github/workflows/integration-tests.yml | 7 ++- .github/workflows/integration.tests.yml | 72 ------------------------- 2 files changed, 5 insertions(+), 74 deletions(-) delete mode 100644 .github/workflows/integration.tests.yml diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index 01a2747..85fad68 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -4,6 +4,8 @@ on: # Trigger the workflow on pushes to the main and feature branches. push: branches: [main, feature/**] + pull_request: + branches: [main, feature/**] # Allows us to run the workflow manually from the Actions tab workflow_dispatch: @@ -26,8 +28,9 @@ jobs: flutter-version: ${{ env.flutter_version }} channel: 'stable' cache: true - - uses: actions/setup-java@v1 + - uses: actions/setup-java@v2 with: + distribution: 'zulu' java-version: '11' # Run integration test with android emulator @@ -68,4 +71,4 @@ jobs: channel: 'stable' cache: true - uses: nanasess/setup-chromedriver@v2 - - run: chromedriver --port=4444 & ./integration_test/run_tests.sh + - run: chromedriver --port=4444 & ./integration_test/run_web_tests.sh diff --git a/.github/workflows/integration.tests.yml b/.github/workflows/integration.tests.yml deleted file mode 100644 index a62f691..0000000 --- a/.github/workflows/integration.tests.yml +++ /dev/null @@ -1,72 +0,0 @@ -name: Integration tests - -on: - # Trigger the workflow on pushes to the main and feature branches. - push: - branches: [main, feature/**] - - # Allows us to run the workflow manually from the Actions tab - workflow_dispatch: - -env: - flutter_version: 3.13.6 - iphone_model: iPhone 8 - android_profile: Nexus 6 - android_api_level: 29 - android_target: google_apis - -jobs: - android-integration-tests: - # It should be most efficient to use the macOS because of hardware acceleration available here. - runs-on: macos-latest - steps: - - uses: actions/checkout@v4 - - uses: subosito/flutter-action@v2 - with: - flutter-version: ${{ env.flutter_version }} - channel: 'stable' - cache: true - - uses: actions/setup-java@v2 - with: - distribution: 'zulu' - java-version: '11' - - # Run integration test with android emulator - - name: Run Flutter integration tests - uses: reactivecircus/android-emulator-runner@v2 - with: - target: ${{ env.android_target }} - api-level: ${{ env.android_api_level }} - arch: x86_64 - profile: ${{ env.android_profile }} - script: flutter test integration_test/ - - iOS-integration-tests: - runs-on: macos-latest - steps: - - uses: actions/checkout@v4 - - uses: subosito/flutter-action@v2 - with: - flutter-version: ${{ env.flutter_version }} - channel: 'stable' - cache: true - - # Start iOS simulator - - uses: futureware-tech/simulator-action@v3 - with: - model: ${{ env.iphone_model }} - - # Run integration test - - run: flutter test integration_test/ - - web-integration-test: - runs-on: ubuntu-22.04 - steps: - - uses: actions/checkout@v4 - - uses: subosito/flutter-action@v2 - with: - flutter-version: ${{ env.flutter_version }} - channel: 'stable' - cache: true - - uses: nanasess/setup-chromedriver@v2 - - run: chromedriver --port=4444 & ./integration_test/run_tests.sh