Skip to content
Snippets Groups Projects

Upgrade to latest qpixel

78 files
+ 1597
349
Compare changes
  • Side-by-side
  • Inline

Files

+ 224
13
version: 2.1
jobs:
test:
test-ruby27:
docker:
- image: cimg/ruby:2.7-node
- image: cimg/mysql:8.0
@@ -22,21 +22,157 @@ jobs:
- checkout
- restore_cache:
keys:
- qpixel-{{ checksum "Gemfile" }}
- qpixel-
- qpixel-ruby27-{{ checksum "Gemfile.lock" }}
- qpixel-ruby27-
- run:
name: Install Bundler & gems
command: |
gem install bundler
bundle install --path=~/gems
- run:
name: Clean unnecessary gems
command: |
bundle clean --force
- save_cache:
key: qpixel-ruby27-{{ checksum "Gemfile.lock" }}
paths:
- ~/gems
- run:
name: Copy key
command: |
if [ -z "$MASTER_KEY" ]; then rm config/credentials.yml.enc; else echo "$MASTER_KEY" > config/master.key; fi
- run:
name: Prepare config & database
environment:
RAILS_ENV: test
command: |
cp config/database.sample.yml config/database.yml
cp config/storage.sample.yml config/storage.yml
bundle exec rails db:create
bundle exec rails db:schema:load
bundle exec rails db:migrate
bundle exec rails test:prepare
- run:
name: Current revision
command: |
git rev-parse $(git rev-parse --abbrev-ref HEAD)
- run:
name: Coveralls token
command: |
if [ -z "$COVERALLS_REPO_TOKEN" ]; then echo "Skipping coveralls"; else echo "repo_token: $COVERALLS_REPO_TOKEN" > .coveralls.yml; fi
- run:
name: Test
command: |
bundle exec rails test
- store_test_results:
path: "~/qpixel/test/reports"
system-test-ruby27:
docker:
- image: cimg/ruby:2.7-browsers
- image: cimg/mysql:8.0
command: [--default-authentication-plugin=mysql_native_password]
environment:
MYSQL_ROOT_HOST: '%'
MYSQL_ROOT_PASSWORD: 'root'
MYSQL_DATABASE: 'qpixel_test'
- image: cimg/redis:7.0
working_directory: ~/qpixel
steps:
- run:
name: Install packages
command: |
sudo apt-get --allow-releaseinfo-change -qq update
sudo apt-get -y install git libmariadb-dev libmagickwand-dev
- checkout
- restore_cache:
keys:
- qpixel-ruby27-{{ checksum "Gemfile.lock" }}
- qpixel-ruby27-
- run:
name: Install Bundler & gems
command: |
gem install bundler
bundle install --path=~/gems
- run:
name: Clean unnecessary gems
command: |
bundle clean --force
- save_cache:
key: qpixel-ruby27-{{ checksum "Gemfile.lock" }}
paths:
- ~/gems
- run:
name: Copy key
command: |
if [ -z "$MASTER_KEY" ]; then rm config/credentials.yml.enc; else echo "$MASTER_KEY" > config/master.key; fi
- run:
name: Prepare config & database
environment:
RAILS_ENV: test
command: |
cp config/database.sample.yml config/database.yml
cp config/storage.sample.yml config/storage.yml
bundle exec rails db:create
bundle exec rails db:schema:load
bundle exec rails db:migrate
bundle exec rails test:prepare
- run:
name: Current revision
command: |
git rev-parse $(git rev-parse --abbrev-ref HEAD)
- run:
name: Test
command: |
bundle exec rails test:system
- store_test_results:
path: "~/qpixel/test/reports"
- store_artifacts:
path: "~/qpixel/tmp/screenshots"
when: on_fail
test-ruby31:
docker:
- image: cimg/ruby:3.1-node
- image: cimg/mysql:8.0
command: [ --default-authentication-plugin=mysql_native_password ]
environment:
MYSQL_ROOT_HOST: '%'
MYSQL_ROOT_PASSWORD: 'root'
MYSQL_DATABASE: 'qpixel_test'
- image: cimg/redis:7.0
working_directory: ~/qpixel
steps:
- run:
name: Install packages
command: |
sudo apt-get --allow-releaseinfo-change -qq update
sudo apt-get -y install git libmariadb-dev libmagickwand-dev
- checkout
- restore_cache:
keys:
- qpixel-ruby31-{{ checksum "Gemfile.lock" }}
- qpixel-ruby31-
- run:
name: Install Bundler & gems
command: |
gem install bundler
bundle install --path=~/gems
- run:
name: Clean unnecessary gems
command: |
bundle clean --force
- save_cache:
key: qpixel-{{ checksum "Gemfile" }}
key: qpixel-ruby31-{{ checksum "Gemfile.lock" }}
paths:
- ~/gems
- run:
name: Copy key
command: |
echo "$MASTER_KEY" > config/master.key
if [ -z "$MASTER_KEY" ]; then rm config/credentials.yml.enc; else echo "$MASTER_KEY" > config/master.key; fi
- run:
name: Prepare config & database
environment:
@@ -55,17 +191,82 @@ jobs:
- run:
name: Coveralls token
command: |
echo "repo_token: $COVERALLS_REPO_TOKEN" > .coveralls.yml
if [ -z "$COVERALLS_REPO_TOKEN" ]; then echo "Skipping coveralls"; else echo "repo_token: $COVERALLS_REPO_TOKEN" > .coveralls.yml; fi
- run:
name: Test
command: |
bundle exec rails test
- store_test_results:
path: "~/qpixel/test/reports"
system-test-ruby31:
docker:
- image: cimg/ruby:3.1-browsers
- image: cimg/mysql:8.0
command: [ --default-authentication-plugin=mysql_native_password ]
environment:
MYSQL_ROOT_HOST: '%'
MYSQL_ROOT_PASSWORD: 'root'
MYSQL_DATABASE: 'qpixel_test'
- image: cimg/redis:7.0
working_directory: ~/qpixel
steps:
- run:
name: Install packages
command: |
sudo apt-get --allow-releaseinfo-change -qq update
sudo apt-get -y install git libmariadb-dev libmagickwand-dev
- checkout
- restore_cache:
keys:
- qpixel-ruby31-{{ checksum "Gemfile.lock" }}
- qpixel-ruby31-
- run:
name: Install Bundler & gems
command: |
gem install bundler
bundle install --path=~/gems
- run:
name: Clean unnecessary gems
command: |
bundle clean --force
- save_cache:
key: qpixel-ruby31-{{ checksum "Gemfile.lock" }}
paths:
- ~/gems
- run:
name: Copy key
command: |
if [ -z "$MASTER_KEY" ]; then rm config/credentials.yml.enc; else echo "$MASTER_KEY" > config/master.key; fi
- run:
name: Prepare config & database
environment:
RAILS_ENV: test
command: |
cp config/database.sample.yml config/database.yml
cp config/storage.sample.yml config/storage.yml
bundle exec rails db:create
bundle exec rails db:schema:load
bundle exec rails db:migrate
bundle exec rails test:prepare
- run:
name: Current revision
command: |
git rev-parse $(git rev-parse --abbrev-ref HEAD)
- run:
name: Test
command: |
bundle exec rails test:system
- store_test_results:
path: "~/qpixel/test/reports"
- store_artifacts:
path: "~/qpixel/tmp/screenshots"
when: on_fail
rubocop:
docker:
- image: cimg/ruby:2.7-node
- image: cimg/ruby:3.1-node
working_directory: ~/qpixel
@@ -78,15 +279,19 @@ jobs:
- checkout
- restore_cache:
keys:
- qpixel-{{ checksum "Gemfile" }}
- qpixel-
- qpixel-ruby31-{{ checksum "Gemfile.lock" }}
- qpixel-ruby31-
- run:
name: Install Bundler & gems
command: |
gem install bundler
bundle install --path=~/gems
- run:
name: Clean unnecessary gems
command: |
bundle clean --force
- save_cache:
key: qpixel-{{ checksum "Gemfile" }}
key: qpixel-ruby31-{{ checksum "Gemfile.lock" }}
paths:
- ~/gems
- run:
@@ -96,7 +301,7 @@ jobs:
deploy:
docker:
- image: cimg/ruby:2.7-node
- image: cimg/ruby:3.1-node
working_directory: ~/qpixel
@@ -114,11 +319,17 @@ jobs:
workflows:
test_lint:
jobs:
- test
- test-ruby27
- test-ruby31
- system-test-ruby27
- system-test-ruby31
- rubocop
- deploy:
requires:
- test
- test-ruby27
- test-ruby31
- system-test-ruby27
- system-test-ruby31
- rubocop
filters:
branches:
Loading