Skip to content
Open
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
35 changes: 35 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Node modules
node_modules/

# Test files
src/__tests__/
*.test.ts
vitest.config.ts

# Build artifacts (will be generated during Docker build)
dist/

# Development files
.eslintrc.js
.prettierrc

# Git
.git/
.github/

# Documentation
README.md
LICENSE

# Test/example data
php-files/
specifications/

# IDE
.vscode/
.idea/

# Misc
*.log
npm-debug.log*
.DS_Store
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ yarn-error.log*

# Build output
build/
dist/

# Coverage reports
coverage/
Expand Down
21 changes: 21 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
FROM node:24-alpine

# Set working directory
WORKDIR /action

# Copy package files
COPY package*.json ./
COPY tsconfig.json ./

# Install dependencies
RUN npm install

# Copy source code
COPY src/ ./src/

# Copy entrypoint script
COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh

# Set entrypoint
ENTRYPOINT ["/entrypoint.sh"]
21 changes: 21 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,27 @@ Note: pytest-cov generates Cobertura XML format, not PHPUnit XML. This action no

Contributions are welcome! Please feel free to submit a Pull Request.

### Development

This action is Docker-based, which means:

- The action runs inside a Docker container built from the `Dockerfile`
- No pre-compiled JavaScript files (`dist/`) need to be committed to the repository
- TypeScript code is executed directly at runtime using Node.js 24's native TypeScript support (no build step needed)
- To test locally, you can build the Docker image with:
```bash
docker build -t pr-test-coverage .
```

### Testing Changes

When making changes to the action:

1. Update the TypeScript source files in `src/`
2. Test your changes using the PR check workflow or by building the Docker image locally
3. No need to run `npm run build` - TypeScript runs directly with Node.js native support
4. Commit only the source files, not the compiled `dist/` directory

## License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
4 changes: 2 additions & 2 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,5 +49,5 @@ outputs:
description: 'Total number of lines in changed files'

runs:
using: 'node20'
main: 'dist/index.js'
using: 'docker'
image: 'Dockerfile'
4 changes: 0 additions & 4 deletions dist/CloverParser.d.ts

This file was deleted.

1 change: 0 additions & 1 deletion dist/CloverParser.d.ts.map

This file was deleted.

10 changes: 0 additions & 10 deletions dist/CoverageReporter.d.ts

This file was deleted.

1 change: 0 additions & 1 deletion dist/CoverageReporter.d.ts.map

This file was deleted.

48 changes: 0 additions & 48 deletions dist/DirectoryStructure.d.ts

This file was deleted.

1 change: 0 additions & 1 deletion dist/DirectoryStructure.d.ts.map

This file was deleted.

13 changes: 0 additions & 13 deletions dist/GitHubService.d.ts

This file was deleted.

1 change: 0 additions & 1 deletion dist/GitHubService.d.ts.map

This file was deleted.

4 changes: 0 additions & 4 deletions dist/LcovParser.d.ts

This file was deleted.

1 change: 0 additions & 1 deletion dist/LcovParser.d.ts.map

This file was deleted.

7 changes: 0 additions & 7 deletions dist/MarkdownTableGenerator.d.ts

This file was deleted.

1 change: 0 additions & 1 deletion dist/MarkdownTableGenerator.d.ts.map

This file was deleted.

9 changes: 0 additions & 9 deletions dist/PhpUnitXmlParser.d.ts

This file was deleted.

1 change: 0 additions & 1 deletion dist/PhpUnitXmlParser.d.ts.map

This file was deleted.

16 changes: 0 additions & 16 deletions dist/PrTestCoverageAction.d.ts

This file was deleted.

1 change: 0 additions & 1 deletion dist/PrTestCoverageAction.d.ts.map

This file was deleted.

1 change: 0 additions & 1 deletion dist/index.d.ts

This file was deleted.

1 change: 0 additions & 1 deletion dist/index.d.ts.map

This file was deleted.

Loading
Loading