-
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.
- Loading branch information
Showing
5 changed files
with
186 additions
and
1 deletion.
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,43 @@ | ||
# To get started with Dependabot version updates, you'll need to specify which | ||
# package ecosystems to update and where the package manifests are located. | ||
# Please see the documentation for all configuration options: | ||
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates | ||
|
||
version: 2 | ||
|
||
updates: | ||
- package-ecosystem: "bundler" | ||
directory: "/" | ||
schedule: | ||
interval: "daily" | ||
versioning-strategy: increase | ||
commit-message: | ||
prefix: "gems" | ||
include: "scope" | ||
labels: | ||
- "gems" | ||
- "dependencies" | ||
|
||
- package-ecosystem: "npm" | ||
directory: "/" | ||
schedule: | ||
interval: "daily" | ||
versioning-strategy: increase | ||
commit-message: | ||
prefix: "npm" | ||
include: "scope" | ||
labels: | ||
- "npm" | ||
- "dependencies" | ||
|
||
# Check for updates to GitHub Actions every weekday | ||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
schedule: | ||
interval: "daily" | ||
commit-message: | ||
prefix: "github-actions" | ||
include: "scope" | ||
labels: | ||
- "github-actions" | ||
- "dependencies" |
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,19 @@ | ||
name: Docker | ||
|
||
on: [push,pull_request] | ||
|
||
jobs: | ||
build: | ||
name: Build Docker Image | ||
runs-on: ubuntu-latest | ||
steps: | ||
- | ||
name: Docker Build | ||
id: docker_build | ||
uses: docker/build-push-action@v2 | ||
with: | ||
push: false | ||
tags: joel/weblog:latest | ||
- | ||
name: Image digest | ||
run: echo ${{ steps.docker_build.outputs.digest }} |
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,29 @@ | ||
|
||
name: Ruby Linter | ||
|
||
on: [push,pull_request] | ||
|
||
jobs: | ||
test: | ||
name: Run Test Suite | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Ruby 3.0 | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: 3.0.0 | ||
- name: Cache gems | ||
uses: actions/cache@v1 | ||
with: | ||
path: vendor/bundle | ||
key: ${{ runner.os }}-linter-${{ hashFiles('**/Gemfile.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-linter- | ||
- name: Install gems | ||
run: | | ||
bundle config path vendor/bundle | ||
bundle config set without 'default doc job cable storage ujs test db' | ||
bundle install --jobs 4 --retry 3 | ||
- name: Run Linter | ||
run: bundle exec standardrb |
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,94 @@ | ||
name: Tests | ||
|
||
on: [push,pull_request] | ||
|
||
jobs: | ||
# Label of the runner job | ||
runner-job: | ||
name: Run Test Suite | ||
runs-on: ubuntu-latest | ||
|
||
# Services | ||
services: | ||
db: | ||
image: postgres | ||
env: | ||
POSTGRES_PASSWORD: postgres | ||
POSTGRES_USER: postgres | ||
|
||
# Set health checks to wait until db has started | ||
options: >- | ||
--health-cmd pg_isready | ||
--health-interval 10s | ||
--health-timeout 5s | ||
--health-retries 5 | ||
ports: | ||
# Maps tcp port 5432 on service container to the host | ||
- 5432:5432 | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Set up Ruby | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: 3.0.0 | ||
|
||
- name: Cache gems | ||
uses: actions/cache@v1 | ||
with: | ||
path: vendor/bundle | ||
key: ${{ runner.os }}-test-${{ hashFiles('**/Gemfile.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-test- | ||
- name: Install Ruby dependencies | ||
run: | | ||
sudo apt-get --assume-yes install libpq-dev | ||
gem install bundler:2.2.11 | ||
bundle config path vendor/bundle | ||
bundle config set without 'production' | ||
bundle install --jobs 4 --retry 3 | ||
- name: Get yarn cache directory path | ||
id: yarn-cache-dir-path | ||
run: echo "::set-output name=dir::$(yarn cache dir)" | ||
|
||
- name: Cache Js dependencies | ||
uses: actions/cache@v2 | ||
id: yarn-cache | ||
with: | ||
path: ${{ steps.yarn-cache-dir-path.outputs.dir }} | ||
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-yarn- | ||
- name: Install NodeJs | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: 15.5.1 | ||
|
||
- name: Cache Node Modules | ||
uses: actions/cache@v2 | ||
with: | ||
path: '**/node_modules' | ||
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }} | ||
|
||
- name: Install Js dependencies | ||
if: steps.yarn-cache.outputs.cache-hit != 'true' | ||
run: yarn --frozen-lockfile | ||
|
||
- name: Create data store | ||
env: | ||
RAILS_ENV: test | ||
DB_HOST: localhost | ||
DB_PORT: 5432 | ||
run: | | ||
bundle exec rails db:create | ||
bundle exec rails db:migrate | ||
- name: Run tests | ||
run: bundle exec rails test:all | ||
env: | ||
DB_HOST: localhost | ||
DB_PORT: 5432 |
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