Merge pull request #809 from degica/ami-for-docker-25 #627
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
name: test | |
jobs: | |
test: | |
container: | |
image: ruby:2.7.7 | |
env: | |
DATABASE_URL: postgres://postgres:postgres@postgres:5432/postgres | |
ENCRYPTION_KEY: abcdefghijklmn | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: workaround | |
run: git config --global --add safe.directory "$GITHUB_WORKSPACE" | |
- uses: actions/checkout@v3 | |
- name: before_install | |
run: bundle install | |
- name: script | |
run: |- | |
set -e | |
bundle exec rake db:create | |
bundle exec rake db:setup | |
bundle exec rspec | |
services: | |
postgres: | |
# Docker Hub image | |
image: postgres:11 | |
# Provide the password for postgres | |
env: | |
POSTGRES_PASSWORD: postgres | |
# Set health checks to wait until postgres has started | |
options: >- | |
--health-cmd pg_isready | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
'on': | |
push: | |
branches: '*' |