DEV Community

Cover image for Testing your Raku module using Github Actions
Juan Julián Merelo Guervós
Juan Julián Merelo Guervós

Posted on

3 2

Testing your Raku module using Github Actions

Using the Raku test GitHub Action (here in the marketplace), copy this into a test-raku.yaml file:

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
Enter fullscreen mode Exit fullscreen mode

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.

Image of Datadog

Master Mobile Monitoring for iOS Apps

Monitor your app’s health with real-time insights into crash-free rates, start times, and more. Optimize performance and prevent user churn by addressing critical issues like app hangs, and ANRs. Learn how to keep your iOS app running smoothly across all devices by downloading this eBook.

Get The eBook

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs