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

Move testing over to GitHub Actions #415

Open
atuttle opened this issue Aug 12, 2021 · 4 comments
Open

Move testing over to GitHub Actions #415

atuttle opened this issue Aug 12, 2021 · 4 comments

Comments

@atuttle
Copy link
Owner

atuttle commented Aug 12, 2021

Seems like Travis has shut off free access for open source projects. We'll need to move our tests to GitHub Actions.

@atuttle
Copy link
Owner Author

atuttle commented Dec 4, 2021

I've got the tests running (not passing) on actions: https://github.com/atuttle/Taffy/actions

Currently they only run for the branch feature/github-actions, so that we can get them all working before merging the change into main.

Most of the tests that are currently failing are the ones that make HTTP requests, and are currently getting status 500 responses. Some of the rest are failing because of the weird way the tests (are/must be) written to get around the fact that most of the configuration work is done in Application.cfc lifecycle hooks. (And because that old test code doesn't seem to jive with the current way things are configured...)

At the moment I'm not sure if we should continue to pursue reviving the old tests from the dead or start from scratch.

Also making things difficult is that in order to get the tests running in Actions I'm using @pixl8/github-action-box-test, which seems to be a great start for getting the testbox tests to run, but I'm not exactly sure how to make the same config run locally so that I can run the tests locally too without any changes.

And lastly, as far as I can tell, commandbox doesn't work on M1 macs yet. I installed with brew install commandbox and whenever I try to run box it throws a couple of java errors and shuts itself down.

I would love if others from the community could help get the tests running and passing.

@atuttle atuttle pinned this issue Dec 5, 2021
@atuttle
Copy link
Owner Author

atuttle commented Dec 6, 2021

Well, after struggling with the existing stuff I decided to move it off to the side and start fresh.

I got a set of testbox tests running that runs and executes tests in 3 different contexts without modifications:

I'm pretty sure that for the latter two they require a CFML server with the Taffy folder as the web root, which I'll either provide a Dockerfile, and/or I'll make sure that server.json/box.json works to do a box server start and get what you need.

So now all that's left is to port over all of the existing tests. And I'm sure a lot of those will need rethinking. I've learned a lot about testing in the intervening ... checks watch... 4-10 years.

@pfreitag
Copy link
Collaborator

pfreitag commented Dec 6, 2021

@atuttle commandbox does work on M1 macs, but not via homebrew for some reason, I think it might be more of a lucee issue that needs to be addressed. Anyways if you download the box + jre it will work.

Also reworking the tests sounds like to a good idea, I do have quite a bit of experience with Github Actions due to my work on fixinator, so happy to help if you have specific questions. Here are some examples: https://github.com/foundeo/cfml-ci-examples/blob/master/.github/workflows/ci.yml and here's an example using a Matrix (to test multiple CFML engines): https://github.com/foundeo/cfmatrix-example-pass/blob/master/.github/workflows/example.yml

@atuttle
Copy link
Owner Author

atuttle commented Dec 7, 2021

Appreciate the examples. Right now I'm just focusing on getting the tests working again. Then I'll worry about test matrices/etc. :)

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

No branches or pull requests

2 participants