Skip to content

Commit 4e4a77f

Browse files
Copilotneilime
andcommitted
fix: remove container input and always check for missing deps
Co-authored-by: neilime <[email protected]> Signed-off-by: Emilien Escalle <[email protected]>
1 parent 15e2b99 commit 4e4a77f

File tree

3 files changed

+81
-25
lines changed

3 files changed

+81
-25
lines changed

actions/codecov/README.md

Lines changed: 72 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,92 @@
1-
# Codecov Action
1+
<!-- header:start -->
22

3-
Action to upload coverage to Codecov with support for container mode.
3+
# ![Icon](data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGNsYXNzPSJmZWF0aGVyIGZlYXRoZXItdXBsb2FkLWNsb3VkIiBjb2xvcj0iYmx1ZSI+PHBvbHlsaW5lIHBvaW50cz0iMTYgMTYgMTIgMTIgOCAxNiI+PC9wb2x5bGluZT48bGluZSB4MT0iMTIiIHkxPSIxMiIgeDI9IjEyIiB5Mj0iMjEiPjwvbGluZT48cGF0aCBkPSJNMjAuMzkgMTguMzlBNSA1IDAgMCAwIDE4IDloLTEuMjZBOCA4IDAgMSAwIDMgMTYuMyI+PC9wYXRoPjxwb2x5bGluZSBwb2ludHM9IjE2IDE2IDEyIDEyIDggMTYiPjwvcG9seWxpbmU+PC9zdmc+) GitHub Action: Codecov
4+
5+
<div align="center">
6+
<img src="https://opengraph.githubassets.com/36aa7cc4e1d084a81183a986cfab32857be10fa31cf7e5e4b9820a5989b4dae9/hoverkraft-tech/ci-github-nodejs" width="60px" align="center" alt="Codecov" />
7+
</div>
8+
9+
---
10+
11+
<!-- header:end -->
12+
<!-- badges:start -->
13+
14+
[![Marketplace](https://img.shields.io/badge/Marketplace-codecov-blue?logo=github-actions)](https://github.com/marketplace/actions/codecov)
15+
[![Release](https://img.shields.io/github/v/release/hoverkraft-tech/ci-github-nodejs)](https://github.com/hoverkraft-tech/ci-github-nodejs/releases)
16+
[![License](https://img.shields.io/github/license/hoverkraft-tech/ci-github-nodejs)](http://choosealicense.com/licenses/mit/)
17+
[![Stars](https://img.shields.io/github/stars/hoverkraft-tech/ci-github-nodejs?style=social)](https://img.shields.io/github/stars/hoverkraft-tech/ci-github-nodejs?style=social)
18+
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://github.com/hoverkraft-tech/ci-github-nodejs/blob/main/CONTRIBUTING.md)
19+
20+
<!-- badges:end -->
21+
<!-- overview:start -->
422

523
## Overview
624

7-
This action handles uploading code coverage to Codecov. When running in container mode, it automatically installs required dependencies (Git, cURL, gnupg) via pkgxdev, fixes configuration issues with unexpanded environment variables, uploads coverage, and then cleans up the installed dependencies.
25+
Action to upload coverage to Codecov.
26+
27+
- **Automatic dependency management**: Automatically detects and installs missing dependencies (Git, cURL, gnupg) using pkgxdev
28+
- **Configuration fixes**: Automatically fixes pkgxdev configuration issues with unexpanded environment variables in gpgconf.ctl and .curlrc files
29+
- **Cleanup**: Uninstalls dependencies after Codecov upload is complete
30+
- **OIDC support**: Uses OIDC authentication with Codecov for secure uploads
31+
32+
<!-- overview:end -->
33+
<!-- usage:start -->
834

935
## Usage
1036

1137
```yaml
12-
- uses: hoverkraft-tech/ci-github-nodejs/actions/codecov@main
38+
- uses: hoverkraft-tech/ci-github-nodejs/actions/codecov@9f334582b395b78e4d7c88fa08a8957a8fe5513c # copilot/fix-variable-expansion-issue
1339
with:
1440
# Working directory where coverage files are located.
1541
# Can be absolute or relative to the repository root.
1642
#
1743
# Default: `.`
1844
working-directory: .
19-
20-
# Whether running in container mode (installs dependencies if needed)
21-
# Default: `false`
22-
container: "false"
2345
```
2446
47+
<!-- usage:end -->
48+
<!-- inputs:start -->
49+
2550
## Inputs
2651
27-
| **Input** | **Description** | **Required** | **Default** |
28-
| ----------------------- | ------------------------------------------------------------------- | ------------ | ----------- |
29-
| **`working-directory`** | Working directory where coverage files are located. | **false** | `.` |
30-
| **`container`** | Whether running in container mode (installs dependencies if needed) | **false** | `false` |
52+
| **Input** | **Description** | **Required** | **Default** |
53+
| ----------------------- | --------------------------------------------------- | ------------ | ----------- |
54+
| **`working-directory`** | Working directory where coverage files are located. | **false** | `.` |
55+
| | Can be absolute or relative to the repository root. | | |
3156

32-
## Features
57+
<!-- inputs:end -->
58+
<!-- secrets:start -->
59+
<!-- secrets:end -->
60+
<!-- outputs:start -->
61+
<!-- outputs:end -->
62+
<!-- examples:start -->
63+
<!-- examples:end -->
64+
<!-- contributing:start -->
3365

34-
- **Automatic dependency management**: In container mode, automatically detects and installs missing dependencies (Git, cURL, gnupg) using pkgxdev
35-
- **Configuration fixes**: Automatically fixes pkgxdev configuration issues with unexpanded environment variables in gpgconf.ctl and .curlrc files
36-
- **Cleanup**: Uninstalls dependencies after Codecov upload is complete
37-
- **OIDC support**: Uses OIDC authentication with Codecov for secure uploads
66+
## Contributing
67+
68+
Contributions are welcome! Please see the [contributing guidelines](https://github.com/hoverkraft-tech/ci-github-nodejs/blob/main/CONTRIBUTING.md) for more details.
69+
70+
<!-- contributing:end -->
71+
<!-- security:start -->
72+
<!-- security:end -->
73+
<!-- license:start -->
74+
75+
## License
76+
77+
This project is licensed under the MIT License.
78+
79+
SPDX-License-Identifier: MIT
80+
81+
Copyright © 2025 hoverkraft
82+
83+
For more details, see the [license](http://choosealicense.com/licenses/mit/).
84+
85+
<!-- license:end -->
86+
<!-- generated:start -->
87+
88+
---
89+
90+
This documentation was automatically generated by [CI Dokumentor](https://github.com/hoverkraft-tech/ci-dokumentor).
91+
92+
<!-- generated:end -->

actions/codecov/action.yml

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
name: "Codecov"
2-
description: "Action to upload coverage to Codecov with support for container mode"
2+
description: |
3+
Action to upload coverage to Codecov.
4+
5+
- **Automatic dependency management**: Automatically detects and installs missing dependencies (Git, cURL, gnupg) using pkgxdev
6+
- **Configuration fixes**: Automatically fixes pkgxdev configuration issues with unexpanded environment variables in gpgconf.ctl and .curlrc files
7+
- **Cleanup**: Uninstalls dependencies after Codecov upload is complete
8+
- **OIDC support**: Uses OIDC authentication with Codecov for secure uploads
9+
310
author: hoverkraft
411
branding:
512
icon: upload-cloud
@@ -12,17 +19,12 @@ inputs:
1219
Can be absolute or relative to the repository root.
1320
required: false
1421
default: "."
15-
container:
16-
description: "Whether running in container mode (installs dependencies if needed)"
17-
required: false
18-
default: "false"
1922

2023
runs:
2124
using: "composite"
2225
steps:
23-
# Check and install dependencies for codecov in container mode
26+
# Check and install dependencies for codecov
2427
- name: Check Codecov dependencies
25-
if: inputs.container == 'true'
2628
id: check-codecov-deps
2729
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
2830
with:

actions/test/action.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,6 @@ runs:
147147
uses: ./self-test-action/codecov
148148
with:
149149
working-directory: ${{ inputs.working-directory }}
150-
container: ${{ inputs.container }}
151150

152151
# FIXME: workaround until will be merged: https://github.com/actions/runner/pull/1684
153152
- shell: bash

0 commit comments

Comments
 (0)