Skip to content

Format files

Format files #325

Workflow file for this run

name: Build and Test
on: [push, pull_request]
jobs:
build:
name: Run unit tests
runs-on: ubuntu-latest
strategy:
matrix:
flutter: ['3.19.0']
steps:
- uses: actions/checkout@v4
- uses: subosito/flutter-action@v2
with:
flutter-version: ${{ matrix.flutter }}
channel: 'stable'
- run: flutter pub get
- run: flutter test
analyze:
name: Analyze
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: subosito/flutter-action@v2
with:
flutter-version: '3.19.0'
channel: 'stable'
- run: flutter pub get
- run: flutter analyze
- run: dart format --set-exit-if-changed .
build-android:
name: Integration tests on Android
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v1
with:
java-version: "11.x"
# -- Micro --
- name: Cache Micro
id: cache-micro
uses: actions/cache@v2
with:
path: micro.jar
key: ${{ runner.os }}-micro
- name: Get micro
if: steps.cache-micro.outputs.cache-hit != 'true'
run: curl -o micro.jar -L https://github.com/snowplow-incubator/snowplow-micro/releases/download/micro-1.1.2/snowplow-micro-1.1.2.jar
- name: Run Micro in background
run: java -jar micro.jar --collector-config example/tool/micro.conf --iglu example/tool/iglu.json &
- name: Wait on Micro endpoint
timeout-minutes: 2
run: while ! nc -z '0.0.0.0' 9090; do sleep 1; done
# -- Integration tests --
- uses: subosito/flutter-action@v2
with:
flutter-version: '3.19.0'
channel: 'stable'
- name: Run Flutter Driver tests
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: 31
target: default
arch: x86_64
profile: Nexus 6
working-directory: example
script: ./tool/e2e_tests.sh http://10.0.2.2:9090
build-ios:
name: Integration tests on iOS
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
# -- Micro --
- name: Cache Micro
id: cache-micro
uses: actions/cache@v2
with:
path: micro.jar
key: ${{ runner.os }}-micro
- name: Get micro
if: steps.cache-micro.outputs.cache-hit != 'true'
run: curl -o micro.jar -L https://github.com/snowplow-incubator/snowplow-micro/releases/download/micro-1.1.2/snowplow-micro-1.1.2.jar
- name: Run Micro in background
run: java -jar micro.jar --collector-config example/tool/micro.conf --iglu example/tool/iglu.json &
- name: Wait on Micro endpoint
timeout-minutes: 2
run: while ! nc -z '0.0.0.0' 9090; do sleep 1; done
# -- Integration tests --
- name: "Start Simulator"
uses: futureware-tech/simulator-action@v1
with:
model: iPhone 13
erase_before_boot: true
shutdown_after_job: true
- uses: subosito/flutter-action@v2
with:
flutter-version: '3.19.0'
channel: 'stable'
- run: "flutter clean"
- name: Run tests
working-directory: example
run: ./tool/e2e_tests.sh http://0.0.0.0:9090
build-web:
name: Integration tests on Web
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# -- Micro --
- name: Cache Micro
id: cache-micro
uses: actions/cache@v2
with:
path: micro.jar
key: ${{ runner.os }}-micro
- name: Get micro
if: steps.cache-micro.outputs.cache-hit != 'true'
run: curl -o micro.jar -L https://github.com/snowplow-incubator/snowplow-micro/releases/download/micro-1.1.2/snowplow-micro-1.1.2.jar
- name: Run Micro in background
run: java -jar micro.jar --collector-config example/tool/micro.conf --iglu example/tool/iglu.json &
- name: Wait on Micro endpoint
timeout-minutes: 2
run: while ! nc -z '0.0.0.0' 9090; do sleep 1; done
# -- Integration tests --
- uses: subosito/flutter-action@v2
with:
flutter-version: '3.19.0'
channel: 'stable'
- run: chromedriver --port=4444 &
- name: Run tests
working-directory: example
run: ./tool/e2e_tests.sh http://0.0.0.0:9090 "-d web-server"