-
Notifications
You must be signed in to change notification settings - Fork 1
83 lines (77 loc) · 2.65 KB
/
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
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
75
76
77
78
79
80
81
82
83
name: Run CI Suite
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
rubocop:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f
- name: Set up Ruby
uses: ruby/setup-ruby@b818bea8cf015031920150a891dbdd4105cc7e47
with:
ruby-version: '2.5'
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
- name: rubocop
run: bundle exec rubocop
erblint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f
- name: Set up Ruby
uses: ruby/setup-ruby@b818bea8cf015031920150a891dbdd4105cc7e47
with:
ruby-version: '2.5'
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
- name: erblint
run: bundle exec erblint --lint-all
stylelint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f
- uses: actions/setup-node@46071b5c7a2e0c34e49c3cb8a0e792e86e18d5ea
- run: yarn install --frozen-lockfile
- run: yarn run lint
rspec:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f
- name: Login to DockerHub
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9 # v1.10.0
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
- name: Start and Initialize Docker services
run: |
docker compose run sinai bundle install
docker compose up --detach db solr_test
docker compose run sinai bundle exec rails db:setup
- name: run rspec
run: docker compose run sinai bundle exec rspec spec
- name: Stop docker services
run: docker compose down
cypress:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f
- name: Login to DockerHub
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9 # v1.10.0
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
- name: Start and Initialize Docker services
run: |
docker compose run sinai bundle install
docker compose up --detach
docker compose run sinai bundle exec rails db:setup
docker compose ps
- uses: cypress-io/[email protected]
with:
command-prefix: 'percy exec -- npx'
working-directory: e2e
env:
PERCY_TOKEN: ${{ secrets.PERCY_TOKEN }}
- name: Stop docker services
run: docker compose down