-
Notifications
You must be signed in to change notification settings - Fork 0
38 lines (35 loc) · 835 Bytes
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
name: Tests
on:
pull_request:
branches:
- '*'
push:
branches:
- 'main'
jobs:
test:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:latest
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: password
ports: ['5432:5432']
steps:
- uses: actions/checkout@v4
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
bundler-cache: true
- name: Run tests
env:
DATABASE_URL: postgres://postgres:password@localhost:5432/test
RAILS_ENV: test
run: |
bin/rails test:prepare
bin/rails db:test:prepare
bin/rails test
- uses: hatchboxio/github-hatchbox-deploy-action@v2
with:
deploy_key: ${{ secrets.HATCHBOX_DEPLOY_KEY }}