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

Error: EACCES: permission denied, scandir '/lost+found' #90

Closed
paulmccarron opened this issue Oct 20, 2023 · 2 comments
Closed

Error: EACCES: permission denied, scandir '/lost+found' #90

paulmccarron opened this issue Oct 20, 2023 · 2 comments

Comments

@paulmccarron
Copy link

paulmccarron commented Oct 20, 2023

Trying to generate a report for a dot net project, Action is failing with a permission error.

yml

jobs:
  build-and-test:
    runs-on: ubuntu-latest
    permissions: write-all
    defaults:
      run:
        working-directory: ./api
    steps:
    - uses: actions/checkout@v3
    - name: Setup .NET
      uses: actions/setup-dotnet@v3
      with:
        dotnet-version: 6.0.x
    - name: Restore dependencies
      run: dotnet restore
    - name: Build
      run: dotnet build --no-restore
    - name: Test
      run: dotnet test -p:CollectCoverage=true -p:CoverletOutput=TestResults/ -p:CoverletOutputFormat=\"cobertura,opencover\" -p:ExcludeByFile=\"**/*.cshtml\" --no-build --verbosity normal Tests/*.Tests/
    - name: Test Code Coverage Comment
      uses: 5monkeys/cobertura-action@v13
      with:
          repo_token: ${{ secrets.GITHUB_TOKEN }}
          path: /**/TestResults/coverage.cobertura.xml
          skip_covered: false
          minimum_coverage: 75
          show_line: true
          show_branch: true
          show_missing: true
          link_missing_lines: true
          link_missing_lines_source_dir: "api/"
          report_name: Api Test Coverage

Output
Screenshot 2023-10-20 at 21 56 50

@paulmccarron
Copy link
Author

Fixed
Problem was the /**/ in the path parameter, it seemed to be trying to read all the files in the ubuntu-latest runner. Updated to target xml file directly.

- name: Test Code Coverage Comment
      uses: 5monkeys/cobertura-action@v13
      with:
          repo_token: ${{ secrets.GITHUB_TOKEN }}
          path: api/Tests/PROJECT_NAME.Tests/TestResults/coverage.cobertura.xml
          skip_covered: false
          minimum_coverage: 75
          show_line: true
          show_branch: true
          show_missing: true
          link_missing_lines: true
          link_missing_lines_source_dir: "api/"
          report_name: Api Test Coverage

@paulmccarron
Copy link
Author

Closing, see fix for problem above.

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

1 participant