Codebase update to account for updated roles #8665
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |