Using the Raku test GitHub Action (here in the marketplace), copy this into a
on: [ push, pull_request ] jobs: test: runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v2 - name: Test via install uses: JJ/raku-test-action@main
That will install (and cache) dependencies before testing, and then do the test.
That's it ⃰.
⃰ I guess a bit of a making of is in order.
This is what is called a composite GitHub action. These types of actions enable the possibility of doing several steps, and we needed that, mainly to take care of the cache. How to do so was the subject of my previous post. While the cache is going to be generated outside the container, the rest of the action is going to run inside a container. Except for setting up the cache, the rest is run inside a container that runs this image and that has been designed specifically for GitHub actions (using what's mentioned above).
What happens if this one-size-fits-all does not fit you? Well, you can still use
Github::Actions, that comes with its own container. But I guess that'll be the topic of a different post.
Top comments (0)