GitHub Actions
GitHub Actions' Ubuntu 18.04 and Ubuntu 20.04 runners come pre-installed with everything needed to run batect. We recommend using Ubuntu 20.04.
To use the Ubuntu 20.04 runner, specify runs-on: ubuntu:20.04
in your configuration file. For example:
.github/workflows/build.yml
You can see a full example of using Batect with CircleCI in the TypeScript sample project.
#
Caching between buildsIf you're using caches, you can persist these between builds with the following configuration:
.github/workflows/build.yml
The key
should be a value that changes when the contents of the cache change, and remains constant otherwise. A good candidate is the hash of a dependency lockfile,
such as Gemfile.lock
, package-lock.json
, yarn.lock
or go.sum
. The
documentation for caching has
more details on key
.