Release/0.7.1 #340
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- 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: Configure JDK | |
uses: actions/setup-java@v3 | |
with: | |
distribution: "temurin" | |
java-version: "17" | |
# -- 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-12 | |
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@v3 | |
with: | |
model: iPhone 14 Pro Max | |
erase_before_boot: true | |
shutdown_after_job: true | |
os_version: 16.2 | |
- 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" |