-
Notifications
You must be signed in to change notification settings - Fork 5
84 lines (78 loc) · 2.67 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
84
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@f3364599c6aa293cdc2b8391b1b56d0c30e45c8a
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
- name: Start and Initialize Docker services
run: |
docker-compose run web bundle install
docker-compose up --detach
docker-compose run web bundle exec rails db:setup
docker-compose ps
- name: run rspec
run: docker-compose run web 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@f3364599c6aa293cdc2b8391b1b56d0c30e45c8a
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
- name: Start and Initialize Docker services
run: |
docker-compose run web bundle install
docker-compose run web yarn install --frozen-lockfile
docker-compose up --detach
docker-compose run web bundle exec rails db:setup
- uses: cypress-io/github-action@v3
with:
command-prefix: 'percy exec -- npx'
working-directory: e2e
env:
PERCY_TOKEN: ${{ secrets.PERCY_TOKEN }}
- name: Stop docker services
run: docker-compose down