-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added master key reference for GitHub workflow
- Loading branch information
1 parent
32e4cf1
commit 8a01a9c
Showing
1 changed file
with
58 additions
and
56 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,79 +2,81 @@ name: CI | |
|
||
on: | ||
push: | ||
branches: [ main ] | ||
branches: [main] | ||
pull_request: | ||
branches: [ main ] | ||
branches: [main] | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
defaults: | ||
run: | ||
working-directory: ./rails_root | ||
env: | ||
RAILS_MASTER_KEY: ${{ secrets.RAILS_MASTER_KEY }} | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Set up Ruby | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
bundler-cache: true | ||
- name: Set up Ruby | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
bundler-cache: true | ||
|
||
- name: Install dependencies | ||
run: | | ||
gem install bundler | ||
bundle install --jobs 4 --retry 3 | ||
- name: Install dependencies | ||
run: | | ||
gem install bundler | ||
bundle install --jobs 4 --retry 3 | ||
- name: Run RSpec tests | ||
if: '!cancelled()' | ||
run: | | ||
bundle exec rspec | ||
- name: Run RSpec tests | ||
if: '!cancelled()' | ||
run: | | ||
bundle exec rspec | ||
- name: Run Cucumber tests | ||
if: '!cancelled()' | ||
run: | | ||
bundle exec cucumber | ||
- name: Run Cucumber tests | ||
if: '!cancelled()' | ||
run: | | ||
bundle exec cucumber | ||
- name: Generate SimpleCov report | ||
if: '!cancelled()' | ||
run: | | ||
COVERAGE=true bundle exec rspec | ||
COVERAGE=true bundle exec cucumber | ||
- name: Generate SimpleCov report | ||
if: '!cancelled()' | ||
run: | | ||
COVERAGE=true bundle exec rspec | ||
COVERAGE=true bundle exec cucumber | ||
# - name: Upload coverage report | ||
# if: '!cancelled()' | ||
# uses: actions/upload-artifact@v2 | ||
# with: | ||
# name: coverage | ||
# path: coverage | ||
# - name: Upload coverage report | ||
# if: '!cancelled()' | ||
# uses: actions/upload-artifact@v2 | ||
# with: | ||
# name: coverage | ||
# path: coverage | ||
|
||
- name: Rubocop Report | ||
if: '!cancelled()' | ||
run: | | ||
echo "rubocop_offenses=$(rubocop | tail -n1 | awk '{print $4}')" >> "$GITHUB_ENV" | ||
- name: Rubocop Report | ||
if: '!cancelled()' | ||
run: | | ||
echo "rubocop_offenses=$(rubocop | tail -n1 | awk '{print $4}')" >> "$GITHUB_ENV" | ||
- name: Rubocop Badge Color | ||
if: '!cancelled()' | ||
run: | | ||
echo "rubocop_badge_color=$([[ ${{env.rubocop_offenses}} -gt 0 ]] && echo 'red' || echo 'green')" >> "$GITHUB_ENV" | ||
- name: Rubocop Badge Color | ||
if: '!cancelled()' | ||
run: | | ||
echo "rubocop_badge_color=$([[ ${{env.rubocop_offenses}} -gt 0 ]] && echo 'red' || echo 'green')" >> "$GITHUB_ENV" | ||
- name: Rubocop Badge | ||
if: '!cancelled()' | ||
uses: schneegans/[email protected] | ||
with: | ||
auth: ${{ secrets.GIST_SECRET }} | ||
gistID: c7b2d5e19079e12445b300407e383294 | ||
filename: badge.json | ||
label: 'Rubocop' | ||
message: "${{ env.rubocop_offenses }} offenses" | ||
color: ${{ env.rubocop_badge_color }} | ||
- name: Rubocop Badge | ||
if: '!cancelled()' | ||
uses: schneegans/[email protected] | ||
with: | ||
auth: ${{ secrets.GIST_SECRET }} | ||
gistID: c7b2d5e19079e12445b300407e383294 | ||
filename: badge.json | ||
label: 'Rubocop' | ||
message: '${{ env.rubocop_offenses }} offenses' | ||
color: ${{ env.rubocop_badge_color }} | ||
|
||
- name: Upload coverage report to CodeClimate | ||
if: '!cancelled()' | ||
uses: paambaati/[email protected] | ||
env: | ||
CC_TEST_REPORTER_ID: c65072aca2cabde6c5f61913e0a45910a273d78e1a309c785a64de223b1c21af | ||
with: | ||
coverageLocations: ${{ github.workspace }}/**/coverage.json:simplecov | ||
debug: true | ||
- name: Upload coverage report to CodeClimate | ||
if: '!cancelled()' | ||
uses: paambaati/[email protected] | ||
env: | ||
CC_TEST_REPORTER_ID: c65072aca2cabde6c5f61913e0a45910a273d78e1a309c785a64de223b1c21af | ||
with: | ||
coverageLocations: ${{ github.workspace }}/**/coverage.json:simplecov | ||
debug: true |