This repository has been archived by the owner on Mar 29, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 145
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Split CI test steps into dedicated workflows (#421)
* Modify cibuild to only run RSpec * Break up steps to run rubocop & rspec seperately * Move rspec command into main.yml * Split testing and linting into 2 workflows * Update Build names * Improve build name description * Add build step, improve build name * Improve build names once more * Remove cibuild stem from linter * Add install commands for dotenv & bundler * Remove services from linter * Gem install rubocop only * Reset bundler command * Ensure ENV vars can be shared across steps * Rename Build Pipeline to Build
- Loading branch information
Frida Casas
committed
Nov 11, 2019
1 parent
4cadd4e
commit 5d0b0e9
Showing
4 changed files
with
68 additions
and
47 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,21 @@ | ||
name: Rubocop Linter | ||
|
||
on: [pull_request] | ||
|
||
jobs: | ||
verify: | ||
name: Build | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v1 | ||
- name: Set up Ruby 2.5.5 | ||
uses: actions/setup-ruby@v1 | ||
with: | ||
ruby-version: 2.5.5 | ||
- name: Linting with Rubocop | ||
run: | | ||
sudo apt-get install libpq-dev | ||
gem install bundler dotenv | ||
bundle install --jobs 4 --retry 3 | ||
bundle exec rubocop |
This file was deleted.
Oops, something went wrong.
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,45 @@ | ||
name: RSpec Tests | ||
|
||
on: [pull_request] | ||
|
||
jobs: | ||
verify: | ||
name: Build | ||
runs-on: ubuntu-latest | ||
|
||
services: | ||
postgres: | ||
image: postgres:11.3 | ||
ports: | ||
- 5432:5432 | ||
options: >- | ||
--health-cmd pg_isready | ||
--health-interval 10s | ||
--health-timeout 5s | ||
--health-retries 5 | ||
env: | ||
RAILS_ENV: test | ||
PGHOST: localhost | ||
PGUSER: postgres | ||
PGDATABASE: hacktoberfest_test | ||
END_DATE: "2019-10-01 00:00:00 UTC" | ||
START_DATE: "2019-11-01 00:00:00 UTC" | ||
TEST_USER_GITHUB_TOKEN: ${{ secrets.TEST_USER_GITHUB_TOKEN }} | ||
GITHUB_CLIENT_ID: ${{ secrets.GITHUB_CLIENT_ID }} | ||
GITHUB_CLIENT_SECRET: ${{ secrets.GITHUB_CLIENT_SECRET }} | ||
AIRTABLE_APP_ID: ${{ secrets.AIRTABLE_APP_ID }} | ||
AIRTABLE_API_KEY: ${{ secrets.AIRTABLE_API_KEY }} | ||
SEGMENT_WRITE_KEY: ${{ secrets.SEGMENT_WRITE_KEY }} | ||
|
||
steps: | ||
- uses: actions/checkout@v1 | ||
- name: Set up Ruby 2.5.5 | ||
uses: actions/setup-ruby@v1 | ||
with: | ||
ruby-version: 2.5.5 | ||
- name: Build | ||
run: | | ||
script/cibuild | ||
- name: Testing with Rspec | ||
run: | | ||
bundle exec rspec |
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