我想避免在多个阶段执行安装过程。我的travis-ci配置如下,如何避免在测试和部署阶段同时运行安装过程?因为安装会浪费时间。
os: linux
language: android
licenses:
- android-sdk-preview-license-.+
- android-sdk-license-.+
- google-gdk-license-.+
android:
components:
- tools
- platform-tools
- build-tools-28.0.3
- android-28
jdk: oraclejdk8
sudo: false
install:
- git clone https://github.com/flutter/flutter.git -b stable --depth 1
- export PATH=$PATH:./flutter/bin
- flutter doctor
cache:
directories:
- "$HOME/.pub-cache"
stages:
- test
- name: depoly
if: tag =~ /^release-v\d+\.\d+\.\d+/ # tag match: release-v1.0.0
jobs:
include:
- stage: test
- script: flutter analyze lib/ test/
- script: flutter test test/
- stage: depoly
- script: flutter build apk
deploy:
provider: releases
api_key:
secure: $github_deploy_api_key
file: $APK_NAME
skip_cleanup: true
overwrite: true
on:
repo: stefanJi/Flutter4GitLab
branch: master