-
Notifications
You must be signed in to change notification settings - Fork 8
65 lines (62 loc) · 1.63 KB
/
rubocop.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
name: Code style
on: [push]
jobs:
ruby:
name: "Ruby"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.2.2
- uses: actions/cache@v4
with:
path: cosmetics-web/vendor/bundle
key: ${{ runner.OS }}-gems-${{ hashFiles('**/Gemfile.lock') }}
restore-keys: |
${{ runner.OS }}-gems-
- name: Install ruby gems
working-directory: cosmetics-web
run: |
gem install bundler -v 2.5.22 --no-doc
bundle config path vendor/bundle
bundle check || bundle install --jobs 4 --retry 3
- name: Run rubocop
run: |
cd cosmetics-web
bundle exec rubocop
- name: Run brakeman
run: |
cd cosmetics-web
bundle exec brakeman
front_end:
name: "Sass and JavaScript"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Nodejs
uses: actions/setup-node@v4
with:
node-version: 20.12.x
- uses: actions/cache@v4
with:
path: cosmetics-web/node_modules
key: ${{ runner.OS }}-build-${{ hashFiles('cosmetics-web/yarn.lock') }}
restore-keys: |
${{ runner.OS }}-build-${{ env.cache-name }}-
${{ runner.OS }}-build-
${{ runner.OS }}-
- name: Install npm dependencies
run: |
cd cosmetics-web
npm install yarn
yarn install
- name: Run JavaScript linter
run: |
cd cosmetics-web
yarn lint:js
- name: Run SCSS linter
run: |
cd cosmetics-web
yarn lint:css