steps:
  setup:
    image: ruby:3.4
    env:
      RACK_ENV: testing
    commands:
      - gem install rake
      - bundle config set --local path "vendor/bundle"
      - bundle install
      - RACK_ENV=testing rake db:migrate

  test_ruby34:
    image: ruby:3.4
    env:
      RACK_ENV: testing
    commands:
      - gem install rake
      - bundle config set --local path "vendor/bundle"
      - rake test:unit
    group: tests

  style:
    image: ruby:3.4
    env:
      RACK_ENV: testing
    commands:
      - gem install rake
      - bundle config set --local path "vendor/bundle"
      - rake test:lint

  gitea_release:
    image: plugins/gitea-release
    settings:
      api_key:
        from_secret: gitea_api_key
      base_url: https://git.metaunix.net
      title: "${CI_COMMIT_TAG}"
    when:
      event:
        - tag
