CxxTest/cxxtest

Run using github workflow actions?

rboston628 opened this issue · 2 comments

Forgive my ignorance. I've setup a repo to use CxxTest. I would like to setup a github workflow to automatically run the tests for me when a PR is created. The repo is C++ and compiled from makefiles, and everything within github's runner works fine until it gets to creating the tests, and the runners can not execute the cxxtestgen command. I need to instruct the github runners to install cxxtestgen in order to create and run the tests. Is there a standard or recommended process for writing an action to accomplish this?

I can partially answer my own question. The following .yml was able to work using a standard makefile:

name: C/C++ CI

on:
  push:
    branches: [ "main" ]
  pull_request:
    branches: [ "main" ]

jobs:
  build-and-test:
    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@v3
    - name: install cxxtest
      run: sudo apt install -y cxxtest
    - name: make program
      run: make
    - name: make tests
      run: make tests
    - name: run tests
      run: ./tests/tests.out

Further, if specifying a macos runner, replacing sudo apt install -y cxxtest with brew install cxxtest works just fine.

However, I have not figured out how to download on windows.

Configuring to enable testing on windows runners could be achieved if this code base were available chocolatey. This is apparently the preferred way for github runners to download dependencies.