Skip to content

Continue sending if errors #569

Continue sending if errors

Continue sending if errors #569

Workflow file for this run

name: Main
on: [push]
jobs:
vm-job:
runs-on: ubuntu-latest
env:
RAILS_ENV: test
NODE_ENV: test
# If you need DB like PostgreSQL then define service below.
# https://github.com/actions/example-services/tree/master/.github/workflows
services:
postgres:
image: postgres:13.9
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: postgres
ports: ['5432:5432']
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
# https://help.github.com/en/articles/workflow-syntax-for-github-actions#jobsjob_idstrategymatrix
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v3
- name: Set up Ruby
uses: ruby/setup-ruby@v1
- name: Setup Bundler Cache
uses: actions/cache@v3
with:
path: vendor/bundle
key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}
restore-keys: |
${{ runner.os }}-gems-
- name: Setup Asset Cache
uses: actions/cache@v3
with:
path: public/packs-test
key: ${{ runner.os }}-assets-${{ steps.extract_branch.outputs.branch }}
restore-keys: |
${{ runner.os }}-assets-
# required to compile pg ruby gem
- name: Install PostgreSQL client
run: sudo apt-get install libpq-dev
- name: Build and create DB
env:
# use localhost for the host here because we have specified a container for the job.
# If we were running the job on the VM this would be postgres
PGHOST: localhost
PGUSER: postgres
PGPORT: ${{ job.services.postgres.ports[5432] }} # get randomly assigned published port
RAILS_ENV: test
DATABASE_URL: postgres://postgres:postgres@localhost:${{ job.services.postgres.ports[5432] }}/dabble_test
run: |
mkdir -p ~/tmp/capybara
mkdir ~/rspec
gem install bundler -v 2.4.22
bundle config path vendor/bundle
bundle install --jobs 4 --retry 3
bin/rails db:create
bin/rails db:migrate
- name: Run tests
env:
PGHOST: localhost
PGUSER: postgres
PGPORT: ${{ job.services.postgres.ports[5432] }} # get randomly assigned published port
DATABASE_URL: postgres://postgres:postgres@localhost:${{ job.services.postgres.ports[5432] }}/dabble_test
RAILS_ENV: test
AWS_ACCESS_KEY_ID: test
AWS_BUCKET: test
AWS_SECRET_ACCESS_KEY: test
DEVISE_SECRET_KEY: test
GUMROAD_PRODUCT_ID: test
GUMROAD_SELLER_ID: test
MAILCHIMP_API_KEY: test
MAILCHIMP_LIST_ID: test
MAIN_DOMAIN: test
PAYPAL_SELLER_ID: test
SMTP_DOMAIN: test
run: |
bundle exec rake
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: screenshots
path: ~/tmp/capybara