-
Notifications
You must be signed in to change notification settings - Fork 3
75 lines (59 loc) · 1.7 KB
/
automated-tests.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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
name: Automated Tests
on:
push:
branches:
- master
pull_request:
branches:
- master
workflow_dispatch:
jobs:
automated-tests:
name: ${{ matrix.tests.command }}
runs-on: ubuntu-latest
env:
CI: true
RAILS_ENV: test
SPEC_OPTS: --force-color
services:
database:
image: mariadb:10.5.4-focal
env:
MYSQL_ROOT_PASSWORD: password
MYSQL_DATABASE: opendoorstempsite
ports:
- 3306:3306
redis:
image: redis:3.2.1
ports:
- 6379:6379
steps:
- name: Check out code
uses: actions/checkout@v2
- name: Run apt-get update
run: sudo apt-get update
- name: Set up Node js
uses: actions/setup-node@v2
with:
node-version: '14.14.0'
- name: Install dependencies for Node and MariaDB
run: sudo apt-get install -y libnode-dev libmariadb-dev
# - name: Install LibXML
# run: sudo apt-get install libxml2-dev
- name: Set up Ruby and run bundle install
uses: ruby/setup-ruby@v1
with:
bundler-cache: true
- name: Copy config files
run: |
cp config/github-actions/cable.yml config/cable.yml
cp config/github-actions/database.yml config/database.yml
cp config/github-actions/secrets.yml config/secrets.yml
- name: Make database
run: bundle exec rake db:create db:schema:load db:migrate
- name: Install NPM modules
run: npm install
- name: Compile front-end application
run: bundle exec rake webpacker:compile
- name: Run tests
run: bundle exec rspec spec --format doc