-
Notifications
You must be signed in to change notification settings - Fork 384
Separate tests workflows (#530) #539
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
justin808
merged 3 commits into
shakacode:master
from
yassa-tamer:separate-test-workflow
Aug 3, 2023
Merged
Changes from 1 commit
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,76 @@ | ||
# 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 js tests. | ||
name: "JS CI" | ||
on: | ||
push: | ||
branches: [ "master" ] | ||
pull_request: | ||
branches: [ "master" ] | ||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
services: | ||
postgres: | ||
image: postgres:11-alpine | ||
ports: | ||
- "5432:5432" | ||
env: | ||
POSTGRES_DB: rails_test | ||
POSTGRES_USER: rails | ||
POSTGRES_PASSWORD: password | ||
env: | ||
RAILS_ENV: test | ||
NODE_ENV: test | ||
DATABASE_URL: "postgres://rails:password@localhost:5432/rails_test" | ||
DRIVER: selenium_chrome | ||
CHROME_BIN: /usr/bin/google-chrome | ||
USE_COVERALLS: true | ||
steps: | ||
- name: Install Chrome | ||
uses: browser-actions/setup-chrome@latest | ||
|
||
- name: Check Chrome version | ||
run: chrome --version | ||
|
||
- name: Check Chrome version | ||
run: google-chrome --version | ||
|
||
- name: Set Display environment variable | ||
run: "export DISPLAY=:99" | ||
|
||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Install Ruby and gems | ||
uses: ruby/setup-ruby@0a29871fe2b0200a17a4497bae54fe5df0d973aa # v1.115.3 | ||
with: | ||
bundler-cache: true | ||
|
||
- name: Use Node.js 18.x | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18.x | ||
- name: Install Node Packages | ||
run: npm install --legacy-peer-deps | ||
|
||
- name: Set up database schema | ||
run: bin/rails db:schema:load | ||
|
||
- name: Build i18n libraries | ||
run: bundle exec rake react_on_rails:locale | ||
|
||
- name: Build shakapacker chunks | ||
run: NODE_ENV=development bundle exec bin/shakapacker | ||
|
||
- name: Run js tests with xvfb | ||
uses: GabrielBB/xvfb-action@v1 | ||
with: | ||
run: bundle exec rake ci_js_tests | ||
working-directory: ./ #optional | ||
options: ":99 -ac -screen scn 1600x1200x16" |
This file contains hidden or 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,51 @@ | ||
# 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 rspec tests. | ||
name: "Lint CI" | ||
on: | ||
push: | ||
branches: [ "master" ] | ||
pull_request: | ||
branches: [ "master" ] | ||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
env: | ||
RAILS_ENV: test | ||
NODE_ENV: test | ||
steps: | ||
- name: Set Display environment variable | ||
run: "export DISPLAY=:99" | ||
|
||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Install Ruby and gems | ||
uses: ruby/setup-ruby@0a29871fe2b0200a17a4497bae54fe5df0d973aa # v1.115.3 | ||
with: | ||
bundler-cache: true | ||
|
||
- name: Use Node.js 18.x | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18.x | ||
- name: Install Node Packages | ||
run: npm install --legacy-peer-deps | ||
|
||
- name: Build i18n libraries | ||
run: bundle exec rake react_on_rails:locale | ||
|
||
- name: Build shakapacker chunks | ||
run: NODE_ENV=development bundle exec bin/shakapacker | ||
|
||
- name: Run lint tests with xvfb | ||
uses: GabrielBB/xvfb-action@v1 | ||
with: | ||
run: bundle exec rake lint | ||
working-directory: ./ #optional | ||
options: ":99 -ac -screen scn 1600x1200x16" |
This file contains hidden or 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,76 @@ | ||
# 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 rspec tests. | ||
name: "rspec CI" | ||
on: | ||
push: | ||
branches: [ "master" ] | ||
pull_request: | ||
branches: [ "master" ] | ||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
services: | ||
postgres: | ||
image: postgres:11-alpine | ||
ports: | ||
- "5432:5432" | ||
env: | ||
POSTGRES_DB: rails_test | ||
POSTGRES_USER: rails | ||
POSTGRES_PASSWORD: password | ||
env: | ||
RAILS_ENV: test | ||
NODE_ENV: test | ||
DATABASE_URL: "postgres://rails:password@localhost:5432/rails_test" | ||
DRIVER: selenium_chrome | ||
CHROME_BIN: /usr/bin/google-chrome | ||
USE_COVERALLS: true | ||
steps: | ||
- name: Install Chrome | ||
uses: browser-actions/setup-chrome@latest | ||
|
||
- name: Check Chrome version | ||
run: chrome --version | ||
|
||
- name: Check Chrome version | ||
run: google-chrome --version | ||
|
||
- name: Set Display environment variable | ||
run: "export DISPLAY=:99" | ||
|
||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Install Ruby and gems | ||
uses: ruby/setup-ruby@0a29871fe2b0200a17a4497bae54fe5df0d973aa # v1.115.3 | ||
with: | ||
bundler-cache: true | ||
|
||
- name: Use Node.js 18.x | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18.x | ||
- name: Install Node Packages | ||
run: npm install --legacy-peer-deps | ||
|
||
- name: Set up database schema | ||
run: bin/rails db:schema:load | ||
|
||
- name: Build i18n libraries | ||
run: bundle exec rake react_on_rails:locale | ||
|
||
- name: Build shakapacker chunks | ||
run: NODE_ENV=development bundle exec bin/shakapacker | ||
|
||
- name: Run rspec tests with xvfb | ||
uses: GabrielBB/xvfb-action@v1 | ||
with: | ||
run: bundle exec rake ci_rspec_tests | ||
working-directory: ./ #optional | ||
options: ":99 -ac -screen scn 1600x1200x16" |
This file contains hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think these tasks could go under
ci
namespace so that we get these tasks:ci
: runsci:all
ci:all
runs all other ci tasksci:js
runsjs_tests
ci:rspec
runs rspec