-
-
Notifications
You must be signed in to change notification settings - Fork 23
58 lines (49 loc) · 1.24 KB
/
test.yml
File metadata and controls
58 lines (49 loc) · 1.24 KB
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#
# Sets up ruby and dependencies directly on the ubuntu-latest
# image and then runs the test suite
#
name: Test
on:
pull_request:
branches:
- main
- devel
workflow_dispatch:
jobs:
run-tests:
name: Run test suite
runs-on: ubuntu-latest
defaults:
run:
working-directory: rails
services:
postgres:
image: postgres:16
ports:
- 5432:5432
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
steps:
- name: Checkout code
uses: actions/checkout@v6
with:
show-progress: false
- name: Install ruby and gems
uses: ruby/setup-ruby@v1
with:
working-directory: rails
ruby-version: '3.4.7'
bundler-cache: true
- name: Install node modules
run: bin/rails yarn:install
- name: Create database
run: bin/rails db:create
# Not strictly needed, because they'll be generated on demand
# automatically, but this makes the test output slightly tidier
- name: Precompile email styles
run: bin/rails bootstrap_email:sass_precompile
- name: Run tests
env:
GROVER_NO_SANDBOX: true
run: bin/rails test