asciidoctor / asciidoctor-mathematical

An extension for Asciidoctor that converts the content of STEM blocks and inline macros using Mathematical.
MIT License
49 stars 44 forks source link

Set up continuous integration and automated releases #50

Closed mojavelinux closed 5 years ago

mojavelinux commented 5 years ago

In order to prevent regressions and make releases more regular, I advise setting up continuous integration (CI) for this project to run the test suite and automate releases.

The tool we use for this in the Asciidoctor ecosystem is Travis CI. The first thing we'll need is a Travis CI configuration file (.travis.yml). Once that's in place, I can enable the CI build on this project. Travis can also handle releasing the gem to rugygems.org, which I can help you get set up.

There are plenty of references for how to set up CI to run the test suite and automate releases. Here are two good examples:

In order for the build to handle the release, the environment variable RUBYGEMS_API_KEY must be defined on the setting screen for the repository in Travis CI. It's best if we use the API key for the Asciidoctor account so that it can be easily updated if it ever has to be renewed.

ProgramFan commented 5 years ago

Thanks, Dan. I will try to figure this out.

tstumm commented 5 years ago

Sorry for the late reply, had a busy week. @mojavelinux is there some organization account for TravisCI? I set up a branch called 'ci' for CI testing, which we can squash merge into master when TravisCI works. I want to get this working asap, so we can push the current version to RubyGems via TravisCI.

mojavelinux commented 5 years ago

Yes, I can active Travis CI on this repository.

tstumm commented 5 years ago

Great, I pushed an initial CI configuration. In order to use Asciidoctors RubyGems API Key I have to add you (@mojavelinux) as an owner of asciidoctor-mathemtatical, am I right?

mojavelinux commented 5 years ago

@tstumm No, you will have admin access to the CI job. The CI access matches the repository access.

mojavelinux commented 5 years ago

@tstumm Can you submit it as a pull request so that it triggers build?

mojavelinux commented 5 years ago

I've activated Travis CI on the repository. See https://travis-ci.org/asciidoctor/asciidoctor-mathematical

tstumm commented 5 years ago

Thanks for the help @mojavelinux !

mojavelinux commented 5 years ago

Sure thing.

I don't think we're done yet, though. I'd like to see a CI build go through. If you send a PR, it should trigger one.

mojavelinux commented 5 years ago

Also, we still have some work to do to get automated releases going.

tstumm commented 5 years ago

See #51, as well as the log in TravisCI for v0.3.0.

mojavelinux commented 5 years ago

Oh, fantastic! In that case, :beers: :tada: :champagne: :confetti_ball: Nice work!