r18n/r18n-core

View on GitHub
.cirrus.yml

Summary

Maintainability
Test Coverage
bundle_cache: &bundle_cache
  bundle_cache:
    folder: /usr/local/bundle
    fingerprint_script:
      - echo $CIRRUS_OS
      - ruby -v
      - cat Gemfile
      - cat *.gemspec
  install_script:
    - gem update --system --no-document
    - bundle update

env:
  ## To suppress flood of warnings:
  ## https://github.com/cirruslabs/cirrus-ci-docs/issues/814
  ## https://github.com/rubygems/rubygems/issues/4466#issuecomment-818688569
  ## Global for:
  ## 1. different tasks (rubocop, test, etc.);
  ## 2. avoiding overriding `env` in specific cases like macOS.
  TMPDIR: $CIRRUS_WORKING_DIR

remark_task:
  container:
    image: node:latest

  node_modules_cache:
    folder: node_modules
    fingerprint_script:
      - echo $CIRRUS_OS
      - node -v
      - cat package.json
    populate_script: npm install
  remark_script: npm run remark

rubocop_task:
  container:
    image: ruby:latest

  <<: *bundle_cache

  rubocop_script: bundle exec rubocop

test_task:
  container:
    matrix:
      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