Skip to content

perf: speed up shorebird_tests with template project and Gradle cache #403

perf: speed up shorebird_tests with template project and Gradle cache

perf: speed up shorebird_tests with template project and Gradle cache #403

Workflow file for this run

name: shorebird_ci
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
on:
pull_request:
push:
branches:
- shorebird/dev
jobs:
test:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
name: 🐦 Shorebird Test
steps:
- name: 📚 Git Checkout
uses: actions/checkout@v4
with:
# Fetch all branches and tags to ensure that Flutter can determine its version
fetch-depth: 0
# TODO(eseidel): shorebird_tests seems to assume flutter is available
# yet it doesn't seem to set it up here?
- name: 🎯 Setup Dart
uses: dart-lang/setup-dart@v1
- uses: actions/setup-java@v4
with:
distribution: "zulu"
java-version: "17"
- name: 📦 Cache Gradle
if: ${{ matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest' }}
uses: actions/cache@v4
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: 🐦 Run Flutter Tools Tests
# TODO(eseidel): Find a nice way to run this on windows.
if: ${{ matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest' }}
run: ../../bin/flutter test test/general.shard
working-directory: packages/flutter_tools
- name: 🐦 Run Shorebird Tests
# TODO(felangel): These tests have a dependency on pkg:flutter_flavorizr which
# requires XCode -- therefore they don't work on Windows.
if: ${{ matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest' }}
run: dart test
working-directory: packages/shorebird_tests