Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flutter project not in root of repo, fails. #3

Closed
MisterJimson opened this issue Aug 27, 2019 · 3 comments
Closed

Flutter project not in root of repo, fails. #3

MisterJimson opened this issue Aug 27, 2019 · 3 comments

Comments

@MisterJimson
Copy link

MisterJimson commented Aug 27, 2019

If you have a Flutter project in a folder in your repo, this action will fail.

Maybe support a param to specify the folder to the Flutter project and just default to root?

Run flutter pub get
Error: No pubspec.yaml file found.
This command should be run from the root of your Flutter project.
Do not run this command from the root of your git clone of Flutter.
##[error]Process completed with exit code 1.
@subosito
Copy link
Owner

I think you can use cd on your run section, like: cd path/to/project && flutter pub get or set working-directory on steps section

@MisterJimson
Copy link
Author

I'll try that thanks

@MisterJimson
Copy link
Author

Yep, works. Here is what the file looks like.

name: CI

on: [push]

jobs:
  test:
    name: Test and build
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v1
      - uses: actions/setup-java@v1
        with:
          java-version: '12.x'
      - uses: subosito/flutter-action@v1
        with:
          flutter-version: '1.7.8+hotfix.4'
      - run: flutter pub get
        working-directory: ./flutter_app
      - run: flutter test
        working-directory: ./flutter_app
      - run: flutter build apk
        working-directory: ./flutter_app

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants