-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Continuous integration with Github actions (#59)
Runs on any _push_ or _pull request_. Consists of two jobs: `test` and `lint` ### Test - Runs the test suite (including system tests) - Publishes the results to Code Climate ### Lint - Runs bundler-audit - Runs brakeman - Runs bundler-leak - Runs standard - Runs rubycritic
- Loading branch information
Showing
5 changed files
with
72 additions
and
22 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 |
---|---|---|
@@ -0,0 +1,55 @@ | ||
# This workflow uses actions that are not certified by GitHub. They are | ||
# provided by a third-party and are governed by separate terms of service, | ||
# privacy policy, and support documentation. | ||
# | ||
# This workflow will install a prebuilt Ruby version, install dependencies, and | ||
# run tests and linters. | ||
name: "Continuous Integration" | ||
on: [push, pull_request] | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
env: | ||
RAILS_ENV: test | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
# Add or replace dependency steps here | ||
- name: Install Ruby and gems | ||
uses: ruby/setup-ruby@55283cc23133118229fd3f97f9336ee23a179fcf # v1.146.0 | ||
with: | ||
bundler-cache: true | ||
ruby-version: 3.2.2 | ||
# Add or replace database setup steps here | ||
- name: Set up database schema | ||
run: bin/rails db:prepare | ||
# Add or replace test runners here | ||
- name: Run test suite & publish results | ||
uses: paambaati/codeclimate-action@v5.0.0 | ||
env: | ||
CC_TEST_REPORTER_ID: ${{secrets.CC_TEST_REPORTER_ID}} | ||
with: | ||
coverageCommand: bin/rails test:all | ||
coverageLocations: ${{github.workspace}}/coverage/coverage.json:simplecov | ||
lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
- name: Install Ruby and gems | ||
uses: ruby/setup-ruby@55283cc23133118229fd3f97f9336ee23a179fcf # v1.146.0 | ||
with: | ||
bundler-cache: true | ||
ruby-version: 3.2.2 | ||
# Add or replace any other lints here | ||
- name: Run Bundler-Audit - Security audit dependencies | ||
run: bin/rails bundle:audit | ||
- name: Run Brakeman - Security audit application code | ||
run: bin/rails brakeman | ||
- name: Run Bundler-Leak - Check for memory leaks in dependencies | ||
run: bin/rails bundle:leak | ||
- name: Run Standard - Lint Ruby files | ||
run: bin/rails standard | ||
- name: Run Rubycritic - Static analysis | ||
run: bin/rails rubycritic |
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 |
---|---|---|
@@ -1,4 +1,8 @@ | ||
minimum_score: 9 | ||
minimum_score: 90 | ||
no_browser: true | ||
formats: | ||
- console | ||
- html | ||
paths: | ||
- "app/" | ||
- "lib/" |
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
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 |
---|---|---|
@@ -1,24 +1,11 @@ | ||
# README | ||
# Letterkenny | ||
|
||
This README would normally document whatever steps are necessary to get the | ||
application up and running. | ||
[![Continuous Integration](https://github.com/cmason/letterkenny/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/cmason/letterkenny/actions/workflows/ci.yml) | ||
[![Maintainability](https://api.codeclimate.com/v1/badges/2f2927df55e93b1540a4/maintainability)](https://codeclimate.com/github/cmason/letterkenny/maintainability) | ||
[![Test Coverage](https://api.codeclimate.com/v1/badges/2f2927df55e93b1540a4/test_coverage)](https://codeclimate.com/github/cmason/letterkenny/test_coverage) | ||
|
||
Things you may want to cover: | ||
Letterkenny consists of hicks, skids, hockey players, and Christians. These are their quotes. | ||
|
||
* Ruby version | ||
---- | ||
|
||
* System dependencies | ||
|
||
* Configuration | ||
|
||
* Database creation | ||
|
||
* Database initialization | ||
|
||
* How to run the test suite | ||
|
||
* Services (job queues, cache servers, search engines, etc.) | ||
|
||
* Deployment instructions | ||
|
||
* ... | ||
TODO: Add content |
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