chore: deprecate tox in favor of act
Set up act as a mean to run GitHub Actions locally as an alternative to tox.
- deprecating
tox - documenting how to use
act
Interesting, I tried this a few years ago iIRC, and it was horribly buggy. Will take it for a new spin..
Interesting, I tried this a few years ago iIRC, and it was horribly buggy. Will take it for a new spin..
Same, I tried using it in 2020 and it was unusable! It'll be good to have a way of running the CI locally, assuming the runs are representative.
Same, I could never get act to actually work. I'll pull/test this, and if I can have luck, I'll merge it AND buy you a beer.
Let me try and make sure most workflows that someone might want to run locally actually runs through.
@rusackas seems like --secret and --container-architecture fixed a lot of things for me, not sure how much you pushed but I have to admit I haven't tried anywhere close to all the workflows yet. Actually many of the workflows don't make sense to run locally...
act --job {workflow_name} --secret GITHUB_TOKEN=$GITHUB_TOKEN --event pull_request --container-architecture linux/amd64
As we discussed on Zoom, I'm still having a hard time getting any of this to work...
- it is having trouble if you've done
npm installinsuperset-frontend,cypress-base,docs,superset-websocketetc, as it finds varioustravis.ymlfiles and gets confused. - even if you
git clean -fdxto get back to a cleared repo, I still get issues. * it might be having some trouble if your git origin is https (tbd)
Hopefully there's a way to at least get around the first issue by pointing it to the workflow files(s) it should pay attention to. I'll do a little reading and see if I get lucky.
changing my origin from https to ssh did not help. :/
Reinstalling node modules in superset-frontend didn't break anything either. Not sure which of the million travis.yml files I had was causing the issue.
Realizing there's significantly much more work to do here. Last time I pushed this forward I found some clear incompatibility between the base Ubuntu images used by github and the ones used by act, something around python's SSL not being configured right in the catthehacker/act-ubuntu image
Thinking about the success criteria for this PR, seems
-
we should be able to run all "locally-relevant" GHA workflow. This means stuff like linting, running tests backend/frontend, pre-commit all, ... We don't need for workflows like the ephemeral envs ones and such to work locally.
-
should be relatively easy to set up, easier than
toxat least
Should we move this back to draft mode until some of the dust settles?
Yup, also would welcome some help here as I got tangled up in other things and it looks like this is getting pushed to the bottom of my todo list now. Things seem super promising, but there's quite a few little things to connect. I discovered there's support for .env files an .secrets files which both can reference env vars and set defaults. Seemed powerful.
The last blocker I had was around the pip install not working (because python ssl lib not properly set up, and while trying to reach out to httpS://pypy.org ) on the base docker images that act is using. Seems pretty doable to swap to any other image, but I didn't get too far.
Not everything works here, but no one uses tox anymore AFAIK, and I think the setup is broken. I advocate for merging this and polishing/improving act and docker-compose support over time
@mistercrunch No ephemeral environment action detected. Please use '/testenv up' or '/testenv down'. View workflow run.
I, for one, will not miss tox. This'll be a much better DevEx.
@mistercrunch and @rusackas I've had a todo to start work on a Dagger PR for Superset for the last six months, but haven't started yet. Bravo on making things better!