Skip to content

CI

CI #298

Workflow file for this run

name: CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:
schedule:
# 12:00 PM IST / 6:30 AM GMT every Sunday and Wednesday.
# GitHub will remove any cache entries that have not been accessed in over 7 days.
- cron: '30 6 * * 0,3'
defaults:
run:
shell: bash
jobs:
test-basic:
runs-on: ${{ matrix.runner }}
strategy:
fail-fast: false
matrix:
runner: [ ubuntu-latest, windows-latest, macos-latest ]
steps:
- uses: actions/checkout@v3
- name: Setup Flutter
uses: ./
- run: flutter --version
shell: pwsh
- run: flutter --version
if: runner.os == 'Windows'
shell: cmd
- run: flutter --version
if: runner.os == 'Windows'
shell: powershell
test-with-ref:
needs: test-basic
runs-on: ${{ matrix.runner }}
strategy:
fail-fast: false
matrix:
runner: [ ubuntu-latest ]
steps:
- uses: actions/checkout@v3
- name: Setup Flutter
uses: ./
with:
ref: 'beta'
test-with-actionsCache:
needs: test-basic
runs-on: ${{ matrix.runner }}
strategy:
fail-fast: false
matrix:
runner: [ ubuntu-latest ]
steps:
- uses: actions/checkout@v3
- name: Setup Flutter
uses: ./
with:
actionsCache: 'false'
test-with-flutterPrecache:
needs: test-basic
runs-on: ${{ matrix.runner }}
strategy:
fail-fast: false
matrix:
include:
- runner: ubuntu-latest
actionsCache: 'true'
- runner: ubuntu-latest
actionsCache: 'false'
steps:
- uses: actions/checkout@v3
- name: Setup Flutter
uses: ./
with:
actionsCache: ${{ matrix.actionsCache }}
flutterPrecache: '--linux --web'
test-with-almost-all:
runs-on: ${{ matrix.runner }}
strategy:
fail-fast: false
matrix:
runner: [ ubuntu-latest, macos-latest ]
pubCachePath: [ '$HOME/.pub-cache-foo' ]
include:
- runner: windows-latest
pubCachePath: '$LOCALAPPDATA\FooPub\Cache'
steps:
- uses: actions/checkout@v3
- name: Setup Flutter
uses: ./
with:
installationPath: '${{ runner.tool_cache }}/flutter-foo'
actionsCacheKey: 'flutter-${{ runner.os }}-almost-all'
setFlutterRootPath: 'true'
setPubCachePath: ${{ matrix.pubCachePath }}
addPubCacheBinToPath: 'true'
flutterPrecache: 'true'
# installationPath
- run: type -a flutter
# setFlutterRootPath
- if: runner.os != 'Windows'
run: echo "FLUTTER_ROOT=$FLUTTER_ROOT"
- if: runner.os == 'Windows'
shell: pwsh
run: echo "FLUTTER_ROOT=$FLUTTER_ROOT"
# setPubCachePath
- run: |
set -x
flutter create myapp
cd myapp
flutter pub get
ls $PUB_CACHE/hosted/pub.dev
# addPubCacheBinToPath
- run: dart pub global activate markdown
- if: runner.os != 'Windows'
run: markdown --help
- if: runner.os == 'Windows'
shell: pwsh
run: markdown --help
- run: ls $PUB_CACHE/global_packages