Code Monkey home page Code Monkey logo

actions's People

Contributors

adziura-ledger avatar avoiney-ledger avatar b0l0k avatar cedriccabessa avatar dependabot[bot] avatar dud225 avatar fbakoura-ledger avatar katticot-ledger avatar meriadec avatar mgrattepanche-ledger avatar mmejdoub-ledger avatar mnicolas-ledger avatar mrfreezeex avatar ncendrier-ledger avatar niooss-ledger avatar noirbizarre avatar noudin-ledger avatar rlaschuk-ledger avatar slundy-ledger avatar tchardonnens avatar tjacquemin-ledger avatar valpinkman avatar ybadiss avatar zzheng-ledger avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

actions's Issues

Slack notification actions use deprecated/unmaintained action `Ilshidur/action-slack`

Hello,
This repository provides Slack notification actions which rely on Ilshidur/action-slack:

- name: Send Slack notification
uses: Ilshidur/[email protected]

- name: Notify Slack
uses: Ilshidur/[email protected]

But https://github.com/Ilshidur/action-slack was archived on Jan 5. 2024, after a notice on Ilshidur/action-slack#255 :

Concerning what's coming next for this project, I consider stopping its maintenance, or at least deprecating it.
As Slack released it's official GitHub Action, I don't find any interest over maintaining an unofficial alternative, because I believe that the personal time I would commit to a project I don't use anymore will not be worth enough against the work of the Slack developers. I highly support open source and I believe that the official Action is the project to pursue. I don't plan to work on this project anymore.

I believe we should migrate to Slack Send GitHub Action (https://github.com/slackapi/slack-github-action).

Typo in Slack release action preventing it to work

Hello,

In

SLACK_CUSTOM_PAYLOAD: ${{ steps.blocks.output.json }}

... output should be outputs. I believe this is why I got an empty SLACK_CUSTOM_PAYLOAD in a release workflow, https://github.com/LedgerHQ/dnswatcher/actions/runs/8357761357/job/22879739075

There could also be an issue with $JSON in the build step... Would it be possible to add echo "$JSON" at the end, to display this variable in the GitHub Actions logs? i.e. right after:

# Only way to return multiline output
echo "json<<JSON" >> $GITHUB_OUTPUT
echo "$JSON" >> $GITHUB_OUTPUT
echo "JSON" >> $GITHUB_OUTPUT

Action `slack/release` does not work

Hello,
When trying to use the slack/release action, it failed (https://github.com/LedgerHQ/dnswatcher/actions/runs/8003790776/job/21859952089):

Error: Unable to process file command 'output' successfully.
Error: Invalid format '  "blocks": ['

I guess there is a syntax error (missing \ ?) in

JSON=$(jq -n \
--arg project "$PROJECT" \
--arg version "$VERSION" \
'{
"blocks": [
{

Or did I do anything wrong?

[pdm/test] Python coverage comment does not link to the right file because of missing path prefix

Hello,

When using LedgerHQ/actions/pdm/test, coverage comments are automatically added to the Pull Request (which is very nice).

But on Python projects using src/ directory, the links are broken. For example on https://github.com/LedgerHQ/dnswatcher/pull/50#issuecomment-1983628093 , the first link to __init__.py goes to https://github.com/LedgerHQ/dnswatcher/blob/1cf040fed6aab5326cc0796e1bce978a7741a223/dnswatcher/__init__.py instead of https://github.com/LedgerHQ/dnswatcher/blob/1cf040fed6aab5326cc0796e1bce978a7741a223/src/dnswatcher/__init__.py (there is a missing src/).

The action https://github.com/MishaKav/pytest-coverage-comment/tree/v1.1.50 provides a parameter for such a use-case, named coverage-path-prefix (it is used to generate GitHub permalink URL: https://github.com/MishaKav/pytest-coverage-comment/blob/v1.1.50/src/parse.js#L294 ).

An easy fix would be to enable users of LedgerHQ/actions/pdm/test to provide coverage-path-prefix to MishaKav/pytest-coverage-comment (in https://github.com/LedgerHQ/actions/blob/1cec2f273472416aaa83eb835ed7487772a0ac94/pdm/test/action.yml)

Nevertheless, something more elegant could exist. For example, as the pyproject.toml contains [tool.pdm.build] package-dir = "src" and [tool.coverage.run] source = ["src"], the action could (maybe?) request a setting to populate coverage-path-prefix automatically. What do you think?

[pdm/meta] The output refs seem to be wrong

Hello,
While trying to understand what pdm/meta is doing, I am struggling with something that I fail to understand. Here are three questions I have, which would help me better understand what is going on.

At the beginning of the action file, some outputs are defined:

outputs:
has_tests:
description: Wether the project has tests exposed through the `test` command
value: ${{ steps.commands.outputs.tests }}
has_coverage:
description: Wether the project has tests with coverage exposed through the `cover` command
value: ${{ steps.commands.outputs.tests }}
has_docs:
description: Wether the project has a documentation exposed through the `doc` command
value: ${{ steps.commands.outputs.docs }}
has_openapi:
description: Wether the project has an OpenAPI specification exposed through the `doc:openapi` command
value: ${{ steps.commands.outputs.openapi }}

=> Question 1. Why is the output has_coverage using outputs.tests instead of output.coverage?

Then, the action actually computes the outputs:

HAS_TESTS=$(jq 'has("test")' <<< "$COMMANDS")
echo "has_tests=${HAS_TESTS}" >> $GITHUB_OUTPUT
HAS_COVERAGE=$(jq 'has("cover")' <<< "$COMMANDS")
echo "has_coverage=${HAS_COVERAGE}" >> $GITHUB_OUTPUT
HAS_DOCS=$(jq 'has("doc")' <<< "$COMMANDS")
echo "has_docs=${HAS_DOCS}" >> $GITHUB_OUTPUT
HAS_OPENAPI=$(jq 'has("doc:openapi")' <<< "$COMMANDS")
echo "has_openapi=${HAS_OPENAPI}" >> $GITHUB_OUTPUT

=> Question 2. These outputs are names has_.... Do the variables defined in output auto-magically add a has_ prefix?

Finally, the action computes some outputs in a step named refs, which are not referenced in the beginning.

=> Question 3. Should the beginning of the action also document target, branch, version and sha?

Could you please take a look?

Action `pdm/release` ignores increment

Hello,
While trying to craft a release with action pdm/release, the increment is ignored and PDM always tries to perform a minor increment.

I guess that's because $INPUT_INCREMENT is always empty in

- name: Bump using commitizen
id: bump
run: |
CMD=('pdm' 'bump' '--changelog-to-stdout')
if [[ $INPUT_INCREMENT ]]; then
CMD+=('--increment' "$INPUT_INCREMENT")
fi
"${CMD[@]}" > body.md
REV="$(pdm run cz version --project)"
echo "REVISION=${REV}" >>"$GITHUB_ENV"
echo "version=${REV}" >>"$GITHUB_OUTPUT"
env:
FORCE_COLOR: true
shell: bash

Example of failed build: https://github.com/LedgerHQ/dnswatcher/actions/runs/8003319535/job/21858406355 . It was launched with increment: MAJOR but the log show:

Run CMD=('pdm' 'bump' '--changelog-to-stdout')
bump: version 0.0.0 โ†’ 0.1.0
tag to create: 0.1.0
increment detected: MINOR

I guess ${{ inputs.increment }} maybe needs to be used in the env: block?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.