Skip to content

Add Rake task to count lines of code for fun #28

Add Rake task to count lines of code for fun

Add Rake task to count lines of code for fun #28

Workflow file for this run

name: Continuous Integration
on:
push:
branches:
- main
pull_request:
jobs:
testing:
runs-on: ubuntu-latest
name: Ruby ${{ matrix.ruby }}
strategy:
matrix:
ruby:
- '3.3.5'
- '3.3.0'
- '3.2.0'
- '3.1.0'
- '3.0.0'
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- name: Run the default task for testing
run: bundle exec rake
check-parser:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.3.5'
bundler-cache: true
- name: Generate parser
run: bundle exec rake generate_parser
- name: Check for changes in parser
run: |
if git diff --quiet ./lib/zaid/parser.rb; then
echo "No changes in parser.rb"
else
echo "parser.rb has changed"
exit 1
fi