Skip to content

Register customer in store too #1780

Register customer in store too

Register customer in store too #1780

name: rails_application
on:
push:
pull_request:
types: [opened, reopened]
jobs:
test:
runs-on: ubuntu-24.04
services:
postgres:
image: postgres:17-alpine
env:
POSTGRES_DB: cqrs-es-sample-with-res_test
POSTGRES_PASSWORD: secret
ports:
- 5432:5432
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
steps:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: ruby-3.4.6
bundler-cache: true
working-directory: rails_application
- name: Run tests
run: make -C rails_application test
env:
DATABASE_URL: "postgres://postgres:secret@localhost:5432/cqrs-es-sample-with-res_test"
RAILS_ENV: test
mutant-test:
runs-on: ubuntu-24.04
services:
postgres:
image: postgres:17-alpine
env:
POSTGRES_DB: cqrs-es-sample-with-res_test
POSTGRES_PASSWORD: secret
ports:
- 5432:5432
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
steps:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: ruby-3.4.6
bundler-cache: true
working-directory: rails_application
- name: Run mutant test runner
run: make -C rails_application test-mutant-runner
env:
DATABASE_URL: "postgres://postgres:secret@localhost:5432/cqrs-es-sample-with-res_test"
RAILS_ENV: test
release:
runs-on: ubuntu-24.04
strategy:
fail-fast: false
env:
WORKING_DIRECTORY: rails_application
needs: [ test ]
if: ${{ github.ref == 'refs/heads/master' }}
steps:
- name: Install Heroku CLI
run: curl https://cli-assets.heroku.com/install.sh | sh
- uses: actions/checkout@v3
- uses: akhileshns/[email protected]
with:
heroku_api_key: ${{ secrets.HEROKU_API_KEY }}
heroku_app_name: "res-ecommerce-rails"
heroku_email: "[email protected]"
- uses: 8398a7/action-slack@v3
with:
status: custom
fields: workflow,job,commit,repo,ref,author,took
custom_payload: |
{
attachments: [{
color: '${{ job.status }}' === 'success' ? 'good' : '${{ job.status }}' === 'failure' ? 'danger' : 'warning',
text: `${process.env.AS_WORKFLOW}/${{ github.job }} ${{ job.status }} in ${process.env.AS_TOOK}\n${process.env.AS_COMMIT} in ${process.env.AS_REF}`,
}]
}
env:
SLACK_WEBHOOK_URL: ${{ secrets.RELEASE_WEBHOOK }}
if: always()
continue-on-error: true