-
Notifications
You must be signed in to change notification settings - Fork 370
43 lines (39 loc) · 1.02 KB
/
main.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
39
40
41
42
name: Main
on: [push, pull_request]
jobs:
base:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
ruby: ["3.1"]
name: Running tests with Ruby ${{ matrix.ruby }}
services:
postgres:
image: postgres:12
env:
POSTGRES_DB: triage_test
POSTGRES_PASSWORD: password
POSTGRES_USER: postgres
ports: ["5432:5432"]
env:
BUNDLE_GEMFILE: Gemfile
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- name: Linting
run: |
bundle exec standardrb
- name: Setup database
run: |
cp config/database.ci.yml config/database.yml
RAILS_ENV=test bundle exec rake db:create db:schema:load
- name: Run tests
run: bin/rake test
- name: Ensure seed task still works
run: RAILS_ENV=test bin/rails db:seed