---version:2.1jobs:ruby-26: docker: - image: circleci/ruby:2.6.3-node-browsers-legacy environment: PGHOST: localhost PGUSER: administrate RAILS_ENV: test - image: postgres:10.1-alpine environment: POSTGRES_USER: administrate POSTGRES_DB: ruby26 POSTGRES_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: 2 build: 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/using-github-hosted-runners/about-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