antidote icon indicating copy to clipboard operation
antidote copied to clipboard

Github Actions Workflow

Open zeljkobekcic opened this issue 2 years ago • 6 comments

I started to create a workflow to automate the tests. There is still something not working correct, so it's a WIP.

zeljkobekcic avatar Mar 28 '22 14:03 zeljkobekcic

Currently the tests fail inside the action. I don't understand why yet.

zeljkobekcic avatar Mar 28 '22 14:03 zeljkobekcic

I love this, thank you! I hadn't gotten there yet, but it was high on my list. I really dig the help.

mattmc3 avatar Mar 28 '22 14:03 mattmc3

Also, when you get it working, can you squash the commits? Seems like we probably only need one final commit for this one and not all the trial and error leading up to get CI working.

mattmc3 avatar Mar 28 '22 14:03 mattmc3

To me the tests in the pipeline fail because of some setup in this test here:

https://github.com/zeljkobekcic/antidote/blob/main/tests/test_bundle.zsh#L1.

Here it clearly says:

# === test_bundle ===
# temp ANTIDOTE_HOME=

This indicates to me, that something did not work. I am sorry, but my ZSH skills are not good enough to understand what is happening there. Can you help me? @mattmc3

zeljkobekcic avatar Mar 28 '22 15:03 zeljkobekcic

Is it possible that cloning ZTAP didn't work? https://github.com/zeljkobekcic/antidote/blob/06847f733f2a4c75e917be8063e234b71e39bcdb/tests/runtests#L14-L15

Should the clone be added to the workflow? I don't have time right now to look too deeply into it, but this is a good start. I'll try to revisit soon.

mattmc3 avatar Mar 28 '22 15:03 mattmc3

I have looked into into it a little more. ZTAP is cloned correctly, but these temp directories are not setup correctly I think. I guess the error is in these lines of code:

0=${(%):-%x}
@echo "=== ${0:t:r} ==="

autoload -Uz ${0:a:h}/functions/setup && setup

This would explain why the string between the === is empty. But I have no clue what is happening here.

zeljkobekcic avatar Mar 29 '22 14:03 zeljkobekcic

@zeljkobekcic - I finally got back around to this, and am hacking away on a feature branch that has a working CI workflow. Thanks for getting me started here. I'm going to close this PR and go the other route with this new branch: https://github.com/mattmc3/antidote/tree/feat-refactor-tests-for-ci

mattmc3 avatar Aug 18 '22 15:08 mattmc3