Added Github action pipeline to verify build and publish package #7
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Run Rake Tests | |
on: | |
push: | |
branches: | |
- workstation-LTS | |
pull_request: | |
branches: | |
- workstation-LTS | |
jobs: | |
unit-tests: | |
name: Execute Tests cases | |
runs-on: ubuntu-latest | |
steps: | |
# Step 1: Checkout the code | |
- name: Checkout Code | |
uses: actions/checkout@v4 | |
# Step 2: Set up Ruby | |
- name: Setup Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: 3.1 # Use Ruby 3.1 as specified | |
# Step 3: Install system dependencies | |
- name: Install Dependencies | |
run: | | |
sudo apt-get update -y | |
sudo apt-get install -y graphviz | |
# Step 4: Install project dependencies | |
- name: Install Bundler and Dependencies | |
run: | | |
rm -f .bundle/config | |
gem install bundler | |
bundle config set --local path 'vendor/bundle' | |
bundle install --jobs=3 --retry=3 | |
# Step 5: Run the Rake tests | |
- name: Run Rake Tests | |
run: | | |
bundle exec rake | |