very_good_coverage icon indicating copy to clipboard operation
very_good_coverage copied to clipboard

working directory is being ignored

Open jorgecoca opened this issue 4 years ago • 2 comments

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/[email protected]
        with:
          path: ./coverage/lcov.info

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

jorgecoca avatar Feb 02 '21 18:02 jorgecoca

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/[email protected]

      - 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/[email protected]
        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/[email protected]
        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

albertodev01 avatar May 27 '21 22:05 albertodev01

Related to https://github.com/actions/runner/issues/467

felangel avatar Jun 14 '21 04:06 felangel