---version:2.1jobs:ruby-26:docker:-image:circleci/ruby:2.6.3-node-browsers-legacyenvironment:PGHOST:localhostPGUSER:administrateRAILS_ENV:test-image:postgres:10.1-alpineenvironment:POSTGRES_USER:administratePOSTGRES_DB:ruby26POSTGRES_PASSWORD:""working_directory:~/administratesteps:-checkout# Bundle install dependencies-run:bundleinstall--pathvendor/bundle# Wait for DB-run:dockerize-waittcp://localhost:5432-timeout1m# Setup the environment-run:cp.sample.env.env# Setup the database-run:bundleexecrakedb:setup# Run the tests-run:bundleexecrakeworkflows:version:2build:jobs:-ruby-26...-attach_workspace:at:/tmp/workspace
name:Containerson: [push]
jobs:build:runs-on:ubuntu-latestcontainer:circleci/ruby:2.6.3-node-browsers-legacyenv:PGHOST:postgresPGUSER:administrateRAILS_ENV:testservices:postgres:image:postgres:10.1-alpineenv:POSTGRES_USER:administratePOSTGRES_DB:ruby25POSTGRES_PASSWORD:""ports:-5432:5432# Add a health checkoptions:--health-cmdpg_isready--health-interval10s--health-timeout5s--health-retries5steps:# This Docker file changes sets USER to circleci instead of using the default user, so we need to update file permissions for this image to work on GH Actions.# See https://docs.github.com/actions/reference/virtual-environments-for-github-hosted-runners#docker-container-filesystem-name:Setupfilesystempermissionsrun:sudochmod-R777$GITHUB_WORKSPACE/github/__w/_temp-uses:actions/checkout@v2-name:Installdependenciesrun:bundleinstall--pathvendor/bundle-name:Setupenvironmentconfigurationrun:cp.sample.env.env-name:Setupdatabaserun:bundleexecrakedb:setup-name:Runtestsrun:bundleexecrake
---version:2.1commands:shared_steps:steps:-checkout# Restore Cached Dependencies-restore_cache:name:Restorebundlecachekey:administrate-{{checksum"Gemfile.lock"}}# Bundle install dependencies-run:bundleinstall--pathvendor/bundle# Cache Dependencies-save_cache:name:Storebundlecachekey:administrate-{{checksum"Gemfile.lock"}}paths:-vendor/bundle# Wait for DB-run:dockerize-waittcp://localhost:5432-timeout1m# Setup the environment-run:cp.sample.env.env# Setup the database-run:bundleexecrakedb:setup# Run the tests-run:bundleexecrakedefault_job:&default_jobworking_directory:~/administratesteps:-shared_steps# Run the tests against multiple versions of Rails-run:bundleexecappraisalinstall-run:bundleexecappraisalrakejobs:ruby-25:<<:*default_jobdocker:-image:circleci/ruby:2.5.0-node-browsersenvironment:PGHOST:localhostPGUSER:administrateRAILS_ENV:test-image:postgres:10.1-alpineenvironment:POSTGRES_USER:administratePOSTGRES_DB:ruby25POSTGRES_PASSWORD:""ruby-26:<<:*default_jobdocker:-image:circleci/ruby:2.6.3-node-browsers-legacyenvironment:PGHOST:localhostPGUSER:administrateRAILS_ENV:test-image:postgres:10.1-alpineenvironment:POSTGRES_USER:administratePOSTGRES_DB:ruby26POSTGRES_PASSWORD:""workflows:version:2multiple-rubies:jobs:-ruby-26-ruby-25