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

working directory is being ignored #35

Closed
jorgecoca opened this issue Feb 2, 2021 · 2 comments · Fixed by #238
Closed

working directory is being ignored #35

jorgecoca opened this issue Feb 2, 2021 · 2 comments · Fixed by #238
Assignees
Labels
bug Something isn't working as expected

Comments

@jorgecoca
Copy link
Contributor

Describe the bug
When you declare a working-directory for your action, all the paths should be relative to that directory, and not to the root of the project.

Expected behavior

jobs:
  build:
    defaults:
      run:
        working-directory: test/path
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v2
      - name: Check Code Coverage
        uses: VeryGoodOpenSource/very_good_coverage@v1.1.1
        with:
          path: ./coverage/lcov.info

The absolute value of path should be test/path/coverage/lcov.info, and not just ./coverage/lcov.info.

@jorgecoca jorgecoca added the bug Something isn't working as expected label Feb 2, 2021
@albertodev01
Copy link

I have just ran into this issue as well with this setup:

  verify_equation_flutter_example:
    name: Equations Flutter example - CI action
    needs: [verify_equation_package]
    runs-on: ubuntu-latest
    if: github.event.pull_request.draft == false
    defaults:
      run:
        working-directory: example/flutter_example
    steps:
      - name: Checkout
        uses: actions/checkout@v2
      - uses: subosito/flutter-action@v1.4.0

      - name: Installing the dependencies
        run: flutter pub get

      - name: Making sure the package is formatted
        run: flutter format --set-exit-if-changed .

      - name: Making sure that there are no analysis warnings or errors
        run: flutter analyze --fatal-infos --fatal-warnings

      - name: Runing unit and widget tests
        run: flutter test --update-goldens --coverage

      - name: Making sure that code coverage is at least 90
        uses: VeryGoodOpenSource/very_good_coverage@v1.1.1
        with:          
          min_coverage: 90

All of this is almost good because, in order to make the coverage tool work, I need to explicitly set the path:

      - name: Making sure that code coverage is at least 90
        uses: VeryGoodOpenSource/very_good_coverage@v1.1.1
        with:          
          path: example/flutter_example/coverage/lcov.info
          min_coverage: 90

This is not a big deal but it'd be convenient if the path were automatically "adjusted" to the relative one specified by working-difectory

@felangel
Copy link
Contributor

Related to actions/runner#467

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working as expected
Projects
None yet
4 participants