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

Add skip-missing-files flag #45

Merged
merged 2 commits into from
Feb 25, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions coverage/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ A GitHub Action for running code coverage analysis using the qlty tool.
| `add-prefix` | Prefix to add to file paths | No | - |
| `strip-prefix` | Prefix to remove from file paths | No | - |
| `skip-errors` | Continue execution even if errors occur | No | `false` |
| `skip-missing-files` | Files not in the directory are skipped | No | `false` |
| `tag` | Tag to associate with the coverage data | No | - |

### Coverage Analysis
Expand Down
4 changes: 4 additions & 0 deletions coverage/dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions coverage/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ async function run(): Promise<void> {
const addPrefix = core.getInput('add-prefix')
const stripPrefix = core.getInput('strip-prefix')
const skipErrors = core.getBooleanInput('skip-errors')
const skipMissingFiles = core.getBooleanInput('skip-missing-files')
const tag = core.getInput('tag')

let uploadArgs = ['coverage', 'publish']
Expand Down Expand Up @@ -157,6 +158,10 @@ async function run(): Promise<void> {
uploadArgs.push('--override-branch', context.payload.pull_request.head.ref)
}

if (skipMissingFiles) {
uploadArgs.push('--skip-missing-files')
}

uploadArgs = uploadArgs.concat(expandedFiles)

writeQltyConfig()
Expand Down