stefanzweifel / git-auto-commit-action

Automatically commit and push changed files back to GitHub with this GitHub Action for the 80% use case.
MIT License
1.98k stars 227 forks source link

Run test suite, file missing #112

Closed francescobianco closed 3 years ago

francescobianco commented 3 years ago

Version of the Action v4.x.x

Describe the bug Where the file shellmock is?

To Reproduce Steps to reproduce the behavior:

  1. Go to terminal into the project directory
  2. Run npm install
  3. Run npm run test
  4. Some tests fail for missing file shellmock

Expected behavior All tests pass by default.

stefanzweifel commented 3 years ago

Thanks for reporting. Unfortunately shellmock can't be installed through NPM. :(

On CI we just clone the repo and run their install script. (GitHub Actions Workflow)

I will add a setup.sh script or something, which will setup everything required to run the tests locally.

stefanzweifel commented 3 years ago

This took a bit longer than expected. I've rewritten the test suite in #128 to no longer mock git. The tests can now be run by simply installing the testing dependencies with yarn or npm and then running yarn test or npm run test.

The README has been slightly updated to indicate, that node dependencies have to be installed. https://github.com/stefanzweifel/git-auto-commit-action#running-the-tests