Skip to content

ci: fix bundler issue in ruby 3.4 unit test #18

ci: fix bundler issue in ruby 3.4 unit test

ci: fix bundler issue in ruby 3.4 unit test #18

Workflow file for this run

# =========================================================================
# Ceedling - Test-Centered Build System for C
# ThrowTheSwitch.org
# Copyright (c) 2010-24 Mike Karlesky, Mark VanderVoord, & Greg Williams
# SPDX-License-Identifier: MIT
# =========================================================================
---
# Continuous Integration Workflow
name: CI
# Triggers the workflow on push or pull request events for master & test branches
on:
push:
branches:
- 'master'
- 'test/**'
pull_request:
branches: [ master ]
workflow_dispatch:
# Needed by softprops/action-gh-release
permissions:
# Allow built gem file push to Github release
contents: write
jobs:
# Job: Linux unit test suite
unit-tests-linux:
name: "Linux Test Suite"
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
ruby: ['3.3']
steps:
# Use a cache for our tools to speed up testing
- uses: actions/cache@v4
with:
path: vendor/bundle
key: bundle-use-ruby-${{ matrix.os }}-${{ matrix.ruby-version }}-${{ hashFiles('**/Gemfile.lock') }}
restore-keys: |
bundle-use-ruby-${{ matrix.os }}-${{ matrix.ruby-version }}-
# Checks out repository under $GITHUB_WORKSPACE
- name: Checkout Latest Repo
uses: actions/checkout@v4
with:
submodules: recursive
# Setup Ruby to run test & build steps on multiple ruby versions
- name: Setup Ruby Version Matrix
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
# Install Gem Depdencies (Bundler version should match the one in Gemfile.lock)
- name: Install Gem Dependencies for Testing and Ceedling Gem Builds
run: |
gem install rubocop -v 0.57.2
gem install bundler -v "$(grep -A 1 "BUNDLED WITH" Gemfile.lock | tail -n 1)"
bundle update
bundle install
# Install gdb for backtrace feature testing
- name: Install gdb for Backtrace Feature Testing
run: |
sudo apt-get update -qq
sudo apt-get install --assume-yes --quiet gdb
# Install GCovr for Gcov plugin
- name: "Install GCovr for Tests of Ceedling Plugin: Gcov"
run: |
sudo pip install gcovr
# Install ReportGenerator for Gcov plugin
# Fix PATH before tool installation
# https://stackoverflow.com/questions/59010890/github-action-how-to-restart-the-session
- name: "Install ReportGenerator for Tests of Ceedling Plugin: Gcov"
run: |
mkdir --parents $HOME/.dotnet/tools
echo "$HOME/.dotnet/tools" >> $GITHUB_PATH
dotnet tool install --global dotnet-reportgenerator-globaltool
# Run Tests
- name: Run All Self Tests
run: |
rake ci
# Build & Install Ceedling Gem
- name: Build and Install Ceedling Gem
run: |
gem build ceedling.gemspec
gem install --local ceedling-*.gem
# Run temp_sensor
- name: Run Tests on temp_sensor Project
run: |
cd examples/temp_sensor
ceedling test:all
cd ../..
# Run FFF Plugin Tests
- name: "Run Tests on Ceedling Plugin: FFF"
run: |
cd plugins/fff
rake
cd ../..
# Run Module Generator Plugin Tests
- name: "Run Tests on Ceedling Plugin: Module Generator"
run: |
cd plugins/module_generator
rake
cd ../..
# Run Dependencies Plugin Tests
- name: "Run Tests on Ceedling Plugin: Dependencies"
run: |
cd plugins/dependencies
rake
cd ../..