mirror of
https://github.com/samsonjs/wordexp.git
synced 2026-03-25 08:45:54 +00:00
53 lines
1.4 KiB
YAML
53 lines
1.4 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
pull_request:
|
|
|
|
jobs:
|
|
rubocop:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
- uses: ruby/setup-ruby@v1
|
|
with:
|
|
ruby-version: 4.0.0
|
|
- name: Cache Ruby gems
|
|
uses: actions/cache@v5
|
|
with:
|
|
path: vendor/bundle
|
|
key: ${{ runner.os }}-bundle-4.0.0-${{ hashFiles('Gemfile.lock') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-bundle-4.0.0-
|
|
- name: Install dependencies
|
|
run: |
|
|
bundle config set --local path vendor/bundle
|
|
bundle install --jobs 8 --retry 3
|
|
- name: Run RuboCop
|
|
run: bundle exec rubocop
|
|
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
ruby-version: ["3.2.9", "3.3.10", "3.4.8", "4.0.0"]
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
- uses: ruby/setup-ruby@v1
|
|
with:
|
|
ruby-version: ${{ matrix.ruby-version }}
|
|
- name: Cache Ruby gems
|
|
uses: actions/cache@v5
|
|
with:
|
|
path: vendor/bundle
|
|
key: ${{ runner.os }}-bundle-${{ matrix.ruby-version }}-${{ hashFiles('Gemfile.lock') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-bundle-${{ matrix.ruby-version }}-
|
|
- name: Install dependencies
|
|
run: |
|
|
bundle config set --local path vendor/bundle
|
|
bundle install --jobs 8 --retry 3
|
|
- name: Run tests
|
|
run: bundle exec rake test
|