Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
G
Greenlight
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Arbeitsgruppe Hardwarenahe IT-Systeme
Greenlight
Commits
dbba634d
Unverified
Commit
dbba634d
authored
Jan 29, 2021
by
Ahmad Farhat
Committed by
GitHub
Jan 29, 2021
Browse files
Options
Downloads
Patches
Plain Diff
Added rubocop and rspec check to Github actions (#2490)
parent
91fbe99f
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
.dockerignore
+1
-0
1 addition, 0 deletions
.dockerignore
.github/ci.yml
+60
-0
60 additions, 0 deletions
.github/ci.yml
.travis.yml
+0
-8
0 additions, 8 deletions
.travis.yml
with
61 additions
and
8 deletions
.dockerignore
+
1
−
0
View file @
dbba634d
...
...
@@ -3,6 +3,7 @@
.gitignore
README.md
SECURITY.md
.github
# Rails
.env
...
...
This diff is collapsed.
Click to expand it.
.github/ci.yml
0 → 100644
+
60
−
0
View file @
dbba634d
env
:
RUBY_VERSION
:
2.7.2
DATABASE_URL
:
postgres://postgres:postgres@localhost:5432/postgres
name
:
CI
on
:
push
:
branches
:
"
master"
pull_request
:
branches
:
"
*"
jobs
:
test
:
name
:
Rubocop + RSpec
runs-on
:
ubuntu-18.04
services
:
postgres
:
image
:
postgres
env
:
POSTGRES_DB
:
postgres
POSTGRES_PASSWORD
:
postgres
POSTGRES_USER
:
postgres
ports
:
-
5432:5432
# Health checks to wait until postgres is ready
options
:
>-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps
:
-
name
:
Checkout
uses
:
actions/checkout@v2
-
name
:
Install Ruby ${{ env.RUBY_VERSION }}
uses
:
actions/setup-ruby@v1
with
:
ruby-version
:
${{ env.RUBY_VERSION }}
-
name
:
Bundle cache
uses
:
actions/cache@v2
with
:
path
:
vendor/bundle
key
:
${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}
restore-keys
:
|
${{ runner.os }}-gems-
-
name
:
Bundle install
run
:
|
bundle config path vendor/bundle
bundle install --jobs 4 --retry 3
-
name
:
Setup database
run
:
|
bundler exec rails db:create RAILS_ENV=test
bundler exec rails db:migrate RAILS_ENV=test
-
name
:
Run Rubocop
run
:
bundle exec rubocop --fail-level F
-
name
:
Run RSpec
run
:
bundle exec rspec
\ No newline at end of file
This diff is collapsed.
Click to expand it.
.travis.yml
+
0
−
8
View file @
dbba634d
...
...
@@ -5,14 +5,6 @@ rvm:
-
2.5.1
jobs
:
include
:
-
stage
:
test
name
:
rubocop
script
:
bundle exec rubocop
if
:
env(CD_TEST_IGNORE) IS NOT present
-
stage
:
test
name
:
rspec
script
:
gem install bundler & bundle exec rspec
if
:
env(CD_TEST_IGNORE) IS NOT present
-
stage
:
build
name
:
build docker image
script
:
bash scripts/image_build.sh $TRAVIS_REPO_SLUG $TRAVIS_BRANCH
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment