Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Testing and linting in GitHub Actions #139

Draft
wants to merge 2 commits into
base: otax/production
Choose a base branch
from

Conversation

nikosavola
Copy link

This PR implements rudimentary testing and linting in GitHub Actions.

Closes #128 or at least the non-CD part

@nikosavola
Copy link
Author

The linting appears to work (and fails due to style errors), but running the tests fails with:

to be executed: node ./node_modules/karma/bin/karma start config/karma.config 
/home/runner/work/ilmomasiina/ilmomasiina/node_modules/streamroller/node_modules/universalify/index.js:15
  }, 'name', { value: fn.name })
                         ^

TypeError: Cannot read property 'name' of undefined
    at exports.fromCallback (/home/runner/work/ilmomasiina/ilmomasiina/node_modules/streamroller/node_modules/universalify/index.js:15:[26](https://github.com/fyysikkokilta/ilmomasiina/runs/5309678633?check_suite_focus=true#step:5:26))
    at Object.<anonymous> (/home/runner/work/ilmomasiina/ilmomasiina/node_modules/streamroller/node_modules/fs-extra/lib/fs/index.js:57:[27](https://github.com/fyysikkokilta/ilmomasiina/runs/5309678633?check_suite_focus=true#step:5:27))
    at Module._compile (module.js:653:[30](https://github.com/fyysikkokilta/ilmomasiina/runs/5309678633?check_suite_focus=true#step:5:30))
    at Object.Module._extensions..js (module.js:664:10)
    at Module.load (module.js:566:[32](https://github.com/fyysikkokilta/ilmomasiina/runs/5309678633?check_suite_focus=true#step:5:32))
    at tryModuleLoad (module.js:506:12)
    at Function.Module._load (module.js:498:3)
    at Module.require (module.js:597:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/home/runner/work/ilmomasiina/ilmomasiina/node_modules/streamroller/node_modules/fs-extra/lib/index.js:5:6)
Error: Process completed with exit code 1.

Some kind of dependency problem probably.

@samporapeli
Copy link
Member

Nice stuff! Did you notice that we've started writing end to end tests using cypress? Do you think this PR will work with them once they are complete enough?

@nikosavola
Copy link
Author

Nice stuff! Did you notice that we've started writing end to end tests using cypress? Do you think this PR will work with them once they are complete enough?

Running cypress appears to be quite easy with cypress-io/github-action@v2, I can try to make this run those.

Are the tests currently in tests/ something that are not really worth using? Maybe I could split this PR to linting in CI to otax/production, and refactor the testing for cypress and make a PR straight to testing/e2e.

@nikosavola nikosavola mentioned this pull request Feb 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement CI/CD pipeline
2 participants