Skip to content

Update CI configuration #1700

Update CI configuration

Update CI configuration #1700

Workflow file for this run

name: CI
on:
pull_request:
branches:
- '*'
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:16
env:
POSTGRES_PASSWORD: password
ports:
- 5432/tcp
# needed because the postgres container does not provide a healthcheck
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup node
uses: actions/[email protected]
with:
cache: 'yarn'
node-version-file: '.tool-versions'
- name: Setup ruby
uses: ruby/setup-ruby@v1
with:
bundler-cache: true
- name: Test
env:
RAILS_ENV: test
DATABASE_URL: postgres://postgres:[email protected]:${{ job.services.postgres.ports[5432] }}/support_act_test
# mirror .env
SENDER: [email protected]
LAST_FM_API_KEY: testing_key
LAST_FM_API_SECRET: testing_secret
run: |
./bin/bootstrap
./bin/rake
./bin/bundle exec rubocop
deploy:
runs-on: ubuntu-latest
needs: build
if: github.ref == 'refs/heads/main'
steps:
- uses: actions/checkout@v3
- uses: akhileshns/[email protected]
with:
heroku_api_key: ${{ secrets.HEROKU_API_KEY }}
heroku_app_name: ${{ secrets.HEROKU_APP_NAME }}
heroku_email: ${{ secrets.HEROKU_EMAIL }}