-
Notifications
You must be signed in to change notification settings - Fork 0
38 lines (31 loc) · 817 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
env:
RAILS_ENV: test
SAAB900_ADMIN_PASSWORD: "admin"
name: Continuous Integration
on:
push:
branches:
- 'main' # Set a branch to deploy
pull_request:
jobs:
test:
name: Test
runs-on: ubuntu-latest
steps:
- name: Start PostgreSQL
run: |
sudo systemctl start postgresql.service
pg_isready
sudo -u postgres createuser -s -d -r -w runner
- uses: actions/checkout@v3
- uses: ruby/setup-ruby@v1
with:
bundler-cache: true
- name: Setup database
run: |
cp ./.github/workflows/templates/database.yml.github-actions config/database.yml
bin/rails db:test:prepare
- name: Precompile assets
run: bin/rails assets:precompile
- name: bin/test
run: bin/test