From 7376c00e2898baf25e6359868fca680257dbe11d Mon Sep 17 00:00:00 2001 From: Philipp Rothmann Date: Thu, 5 Jan 2023 13:46:28 +0100 Subject: [PATCH] add: drone ci --- .drone.yml | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 .drone.yml diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 00000000..f5cd4b2e --- /dev/null +++ b/.drone.yml @@ -0,0 +1,52 @@ +kind: pipeline +type: docker +name: default + +steps: + - name: build_test + image: circleci/ruby:2.6.9-bullseye-node-browsers-legacy + commands: + - sudo apt install --no-install-recommends -y libmagic-dev + - sudo -E bundle install --path /bundle --without production,development + - sudo -E bundle exec rake foodsoft:setup:stock_config || true + - sudo -E bundle exec rake db:schema:load + - sudo -E bundle exec rake rspec-rerun:spec + volumes: + - name: gem-cache + path: /bundle + - name: tmp + path: /drone/src/tmp + environment: + RAILS_LOG_TO_STDOUT: true + RAILS_ENV: test + COVERAGE: lcov + DATABASE_URL: mysql2://user:password@mariadb/test?encoding=utf8mb4 + DATABASE_CLEANER_ALLOW_REMOTE_DATABASE_URL: true + PARALLEL_TEST_PROCESSORS: 15 + + - name: build and publish docker image + image: plugins/docker + settings: + auto_tag: true + username: yksflip + from_secret: docker_registry + repo: yksflip/foodsoft + tags: latest + depends_on: + - build_test + +services: + - name: mariadb + image: mariadb + environment: + MYSQL_USER: user + MYSQL_PASSWORD: password + MYSQL_DATABASE: test + MYSQL_ROOT_PASSWORD: password + +volumes: + - name: gem-cache + host: + path: /tmp/cache + - name: tmp + temp: {}