Skip to content

Error when used with non-root project folder #4

@moseskarunia

Description

@moseskarunia

Yaml

name: horeekaa

on:
  push:
    branches: [master]
    paths:
      - ".github/workflows/horeekaa.yaml"
      - "apps/horeekaa/**"
  pull_request:
    branches: [master, epic-**]
    paths:
      - ".github/workflows/horeekaa.yaml"
      - "apps/horeekaa/**"

jobs:
  build:
    defaults:
      run:
        working-directory: apps/horeekaa
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - uses: subosito/flutter-action@v1.4.0
      - name: Install dependencies
        run: flutter pub get
      - name: Format
        run: flutter format --set-exit-if-changed lib test
      - name: Analyze project source
        run: flutter analyze lib test
      - name: Test
        run: flutter test --coverage
      - name: Report code coverage
        uses: zgosalvez/github-actions-report-lcov@v1
        with:
          coverage-files: apps/horeekaa/coverage/lcov.info
          minimum-coverage: 95
          artifact-name: code-coverage-report
          github-token: ${{ secrets.GITHUB_TOKEN }}

Error Log

Run zgosalvez/github-actions-report-lcov@v1
/usr/bin/sudo apt-get install lcov
Reading package lists...
Building dependency tree...
Reading state information...
The following additional packages will be installed:
libgd-perl
The following NEW packages will be installed:
lcov libgd-perl
0 upgraded, 2 newly installed, 0 to remove and 12 not upgraded.
Need to get 255 kB of archives.
After this operation, 860 kB of additional disk space will be used.
Get:1 http://azure.archive.ubuntu.com/ubuntu bionic/universe amd64 lcov all 1.13-3 [93.1 kB]
Get:2 http://azure.archive.ubuntu.com/ubuntu bionic/main amd64 libgd-perl amd64 2.66-1build1 [162 kB]
Fetched 255 kB in 0s (14.7 MB/s)
Selecting previously unselected package lcov.
(Reading database ...
(Reading database ... 5%
(Reading database ... 10%
(Reading database ... 15%
(Reading database ... 20%
(Reading database ... 25%
(Reading database ... 30%
(Reading database ... 35%
(Reading database ... 40%
(Reading database ... 45%
(Reading database ... 50%
(Reading database ... 55%
(Reading database ... 60%
(Reading database ... 65%
(Reading database ... 70%
(Reading database ... 75%
(Reading database ... 80%
(Reading database ... 85%
(Reading database ... 90%
(Reading database ... 95%
(Reading database ... 100%
(Reading database ... 283623 files and directories currently installed.)
Preparing to unpack .../archives/lcov_1.13-3_all.deb ...
Unpacking lcov (1.13-3) ...
Selecting previously unselected package libgd-perl.
Preparing to unpack .../libgd-perl_2.66-1build1_amd64.deb ...
Unpacking libgd-perl (2.66-1build1) ...
Setting up libgd-perl (2.66-1build1) ...
Setting up lcov (1.13-3) ...
Processing triggers for man-db (2.8.3-2ubuntu0.1) ...
/usr/bin/genhtml /home/runner/work/horeekaa-frontend/horeekaa-frontend/apps/horeekaa/coverage/lcov.info --output-directory /tmp/zgosalvezgithub-actions-report-lcov/html
Reading data file /home/runner/work/horeekaa-frontend/horeekaa-frontend/apps/horeekaa/coverage/lcov.info
Resolved relative source file path "lib/dummy_file.dart" with CWD to "/home/runner/work/horeekaa-frontend/horeekaa-frontend/lib/dummy_file.dart".
Found 1 entries.
Found common filename prefix "/home/runner/work/horeekaa-frontend/horeekaa-frontend"
Writing .css and .png files.
Generating output.
genhtml: ERROR: cannot read /home/runner/work/horeekaa-frontend/horeekaa-frontend/lib/dummy_file.dart
Processing file lib/dummy_file.dart
Error: The process '/usr/bin/genhtml' failed with exit code 2

Proposed solution

Maybe adding an option to set project folder like:

project-dir: apps/horeekaa

or read the directory of workflows as specified in working-directory.

Folder Structure

Screen Shot 2021-02-04 at 14 37 10

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions