Skip to content

Instantly share code, notes, and snippets.

@danielabar
Created July 5, 2021 21:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save danielabar/b5399ce8929a417645b0f67e136f3508 to your computer and use it in GitHub Desktop.
Save danielabar/b5399ce8929a417645b0f67e136f3508 to your computer and use it in GitHub Desktop.
Debug Github Actions Medium Post Gist 1
# .github/workflows/ci.yml
name: CI
on: push
env:
RAILS_ENV: test
RACK_ENV: test
DATABASE_HOST: "127.0.0.1"
REDIS_URL: "redis://127.0.0.1"
jobs:
ci:
runs-on: ubuntu-latest
services:
db:
image: postgres:13
env:
POSTGRES_PASSWORD: its_a_secret
POSTGRES_USER: postgres
ports:
- 5432:5432
volumes:
- /home/runner/work/myapp/myapp/init.sql:/docker-entrypoint-initdb.d/init.sql
redis:
image: redis:6
ports:
- 6379:6379
steps:
- name: Checkout source
uses: actions/checkout@v1
- name: Setup Ruby 2.7
uses: actions/setup-ruby@v1
with:
ruby-version: '2.7'
- name: Setup Node
uses: actions/setup-node@v2-beta
with:
node-version: '12'
- name: bundle install
run: bundle install
- name: yarn install
run: yarn
- name: Initialize database
run: bundle exec rake db:reset
- name: Run linter
run: rubocop
- name: Run tests
run: bundle exec rspec
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment