.cirrus.yaml
bundle_cache: &bundle_cache
bundle_cache:
folder: /usr/local/bundle
fingerprint_script:
- echo $CIRRUS_OS
- ruby -v
- cat Gemfile
- cat *.gemspec
install_script:
- gem install bundler
- bundle update
remark_task:
container:
image: node
node_modules_cache:
folder: node_modules
fingerprint_script:
- echo $CIRRUS_OS
- node -v
- cat package.json
install_script: npm install
lint_script: npm run remark
only_if: ($CIRRUS_BRANCH == 'main') ||
changesInclude(
'.cirrus.yaml', '.gitignore', 'package.json', '.remarkrc.yaml', '**.md'
)
rubocop_task:
container:
image: ruby:latest
<<: *bundle_cache
lint_script: bundle exec rubocop
only_if: ($CIRRUS_BRANCH == 'main') ||
changesInclude(
'.cirrus.yaml', '.gitignore', 'Gemfile', '.toys.rb', '.rubocop.yml', '*.gemspec',
'**.rb', '**.ru'
)
rspec_task:
container:
matrix:
- image: ruby:3.0
- image: ruby:3.1
- image: ruby:3.2
- image: ruby:3.3
<<: *bundle_cache
test_script: bundle exec rspec
codecov_uploader_cache:
folder: codecov
fingerprint_script:
- curl --no-progress-meter https://uploader.codecov.io/latest/linux/codecov.SHA256SUM
populate_script:
- mkdir -p codecov
- curl https://uploader.codecov.io/latest/linux/codecov -o codecov/uploader
- chmod +x codecov/uploader
codecov_script: codecov/uploader
only_if: ($CIRRUS_BRANCH == 'main') ||
changesInclude(
'.cirrus.yaml', '.gitignore', 'Gemfile', '.toys.rb', '.rspec', '*.gemspec', 'lib/**',
'spec/**'
)