From 43530dcda10e6ee2efa1ab71338bb7c3c24fcee8 Mon Sep 17 00:00:00 2001 From: A Taylor <112668339+ATaylorAerospace@users.noreply.github.com> Date: Wed, 1 Apr 2026 22:29:36 -0700 Subject: [PATCH] Create ci.yml ci: add GitHub Actions workflow for Python and C++ --- .github/workflows/ci.yml | 58 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..7bbb446 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,58 @@ +# Author: A Taylor | Purpose: Continuous integration for tri-language test suites +name: CI + +on: + push: + branches: [main] + pull_request: + branches: [main] + +jobs: + # --------------------------------------------------------------------------- + # Python test suite (pytest + astropy.units) + # --------------------------------------------------------------------------- + python: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: ["3.10", "3.11", "3.12"] + steps: + - uses: actions/checkout@v4 + + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + + - name: Install dependencies + run: | + cd python + pip install -e ".[dev]" + + - name: Run pytest + run: | + cd python + pytest tests/ -v --tb=short + + # --------------------------------------------------------------------------- + # C++ test suite (CMake + GoogleTest) + # --------------------------------------------------------------------------- + cpp: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Configure CMake + run: | + cd cpp + cmake -B build -DCMAKE_BUILD_TYPE=Release + + - name: Build + run: | + cd cpp + cmake --build build + + - name: Run CTest + run: | + cd cpp/build + ctest --output-on-failure