Skip to content

Update stripe_ruby_mock #223

Update stripe_ruby_mock

Update stripe_ruby_mock #223

Workflow file for this run

name: Rails
on: push
jobs:
verify:
name: Build
runs-on: ubuntu-latest
services:
postgres:
image: postgres:11
env:
POSTGRES_USER: rails_github_actions
POSTGRES_DB: rails_github_actions_test
POSTGRES_PASSWORD: postgres
ports: ["5432:5432"]
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
redis:
image: redis
ports:
- 6379:6379
options: --entrypoint redis-server
env:
HAPPI_TEAM_ID: 4
RAILS_ENV: test
PGHOST: localhost
POSTGRES_DB: rails_github_actions_test
POSTGRES_USER: rails_github_actions
POSTGRES_PASSWORD: postgres
GOOGLE_RECAPTCHA_KEY: ${{ secrets.GOOGLE_RECAPTCHA_KEY }}
GOOGLE_RECAPTCHA_SECRET: ${{ secrets.GOOGLE_RECAPTCHA_SECRET }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
STRIPE_TEST_SECRET_KEY: ${{ secrets.STRIPE_TEST_SECRET_KEY }}
STRIPE_TEST_WEBHOOKS_SECRET: ${{ secrets.STRIPE_TEST_WEBHOOKS_SECRET }}
SECRET_KEY_BASE: ${{ secrets.SECRET_KEY_BASE }}
POSTMARK_WEBHOOKS_PASSWORD: "testpassword"
steps:
- uses: actions/checkout@v1
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.3.4
bundler-cache: true
- name: Set up Node
uses: actions/setup-node@v1
with:
node-version: 16.14.2
- name: Set timezone
uses: szenius/set-timezone@v1.0
with:
timezoneLinux: "Europe/London"
- name: Install dependencies
run: |
sudo apt-get update -y
sudo apt-get -yqq install libpq-dev build-essential libcurl4-openssl-dev
gem install bundler
bundle install --jobs 4 --retry 3
yarn install
- name: Setup test database
run: |
cp config/database.ci.yml config/database.yml
bundle exec rake db:create db:schema:load
- name: Precompile assets
run: bundle exec rails assets:precompile
- name: Run tests
run: bundle exec rspec
# - name: Rubocop
# run: bin/rubocop
# - name: Bundler Audit Action
# uses: andrewmcodes/bundler-audit-action@v0.1.0