Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run using github workflow actions? #158

Open
rboston628 opened this issue Aug 30, 2023 · 2 comments
Open

Run using github workflow actions? #158

rboston628 opened this issue Aug 30, 2023 · 2 comments

Comments

@rboston628
Copy link

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?

@rboston628
Copy link
Author

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.

@rboston628
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant