Git Product home page Git Product logo

github-action's People

Contributors

carlhoerberg avatar kimburgess avatar matheusrich avatar sija avatar veelenga avatar

Stargazers

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

Watchers

 avatar  avatar  avatar

github-action's Issues

Very slow due to `--release` flag

When installing this action as described in the readme
it unfortunately builds very slowly:

2023-01-08_11-49-51

This seems to be caused by the --release flag that was added in #14.
Having a 5 minute wait in every CI run is not nice and can lead to early exhaustion
of the free build minutes quota.

So I would like to suggest let's revert #14?

Failure in updating the PR with output from the linter.

The linting error ameba reported locally: [C] Layout/TrailingWhitespace: Trailing whitespace detected

Unhandled exception: Response: Unprocessable Entity. Body: {"message":"Invalid request.\n\nFor 'properties/raw_details', nil is not a string.","documentation_url":"https://developer.github.com/v3/checks/runs/#update-a-check-run"} (Exception)
from ../../app/src/ameba-github_action/github_client.cr:22:7 in 'handle_response'
from ../../app/src/ameba-github_action/github_client.cr:18:7 in 'patch'
from ../../app/src/ameba-github_action/runner.cr:62:7 in 'update_check'
from ../../app/src/ameba-github_action/runner.cr:20:9 in 'run'
from ../../app/src/ameba-github_action.cr:4:1 in '__crystal_main'
from ../../usr/share/crystal/src/crystal/main.cr:105:5 in 'main_user_code'
from ../../usr/share/crystal/src/crystal/main.cr:91:7 in 'main'
from ../../usr/share/crystal/src/crystal/main.cr:114:3 in 'main'
from __libc_start_main
from _start
from ???

Running locally this action

From the README.md:

Build the docker image:

docker build . -t crystal-ameba/github-action
Run it:

docker run -it crystal-ameba/github-action

But it fails with stack trace:

Unhandled exception: Missing ENV key: "GITHUB_WORKSPACE" (KeyError)
  from /usr/share/crystal/src/env.cr:53:7 in 'fetch'
  from /usr/share/crystal/src/env.cr:22:5 in '[]'
  from src/ameba-github_action/runner.cr:8:20 in 'initialize'
  from src/ameba-github_action/runner.cr:7:5 in 'new'
  from src/ameba-github_action.cr:4:1 in '__crystal_main'
  from /usr/share/crystal/src/crystal/main.cr:110:5 in 'main_user_code'
  from /usr/share/crystal/src/crystal/main.cr:96:7 in 'main'
  from /usr/share/crystal/src/crystal/main.cr:119:3 in 'main'
  from __libc_start_main
  from _start
  from ???

Any way to run this locally ? I'm contributing to closed source project written in Crystal and using this action in GitHub on pull request, it passed the checks while running ameba locally as dependency, it failed (on purpose introduced fail):


[W] Lint/UselessAssign: Useless assignment to variable `p`
> p = 3
  ^

Finished in 8.93 seconds
30 inspected, 1 failure

EDIT:

Also, this is ameba jobs in our workflow:

# AMEBA
  ameba-test:
    runs-on: ubuntu-latest
    container:
      image: crystallang/crystal:1.0.0
    steps:
      - name: Checkout
        uses: actions/checkout@v1
      - name: Crystal Ameba Linter
        id: crystal-ameba
        uses: crystal-ameba/[email protected]
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Ignored # ameba:disable pragmas

Seems like # ameba:disable comments in code have no effect when ameba is being run as an GitHub Action. running via bin/ameba reports 0 warnings.

Rework the action

Action must be reworked to not be dependent on a specific Ameba version. We need to use Ameba dependency used by the project that installs the action and catch reported issues over json formatter, for example.

That way we will not need to bump a new release for action each time we release the Ameba

Unhandled exception: Arithmetic overflow (OverflowError)

https://github.com/cloudamqp/amqproxy/runs/2240784848?check_suite_focus=true

Unhandled exception: Arithmetic overflow (OverflowError)
  from /usr/share/crystal/src/json/any.cr:167:18 in 'as_i'
  from /app/src/ameba-github_action/runner.cr:36:7 in 'create_check'
  from /app/src/ameba-github_action/runner.cr:17:7 in 'run'
  from /app/src/ameba-github_action.cr:4:1 in '__crystal_main'
  from /usr/share/crystal/src/crystal/main.cr:110:5 in 'main_user_code'
  from /usr/share/crystal/src/crystal/main.cr:96:7 in 'main'
  from /usr/share/crystal/src/crystal/main.cr:119:3 in 'main'
  from __libc_start_main
  from _start
  from ???

Still slow because it compiles ameba

Not as bad as #16 but it still takes over 2 minutes to compile the binary, repeated on each and every action 😞 while running Ameba itself will run in 1 second.

Capture d’écran de 2023-08-18 13-09-52@2x

Couldn't the action download a precompiled binary? It could be attached to the releases for example. The action would then only take a few seconds to run.

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.