-
Notifications
You must be signed in to change notification settings - Fork 156
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
326 changed files
with
12,713 additions
and
4,842 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,87 @@ | ||
version: 2.1 | ||
|
||
workflows: | ||
version: 2.1 | ||
build: | ||
jobs: | ||
- build_and_test | ||
orbs: | ||
browser-tools: circleci/[email protected] | ||
jobs: | ||
build_and_test: | ||
working_directory: ~/cfp_app | ||
docker: | ||
- image: cimg/ruby:3.1.2-browsers | ||
environment: | ||
PGHOST: localhost | ||
PGUSER: cfp_app | ||
RAILS_ENV: test | ||
- image: postgres:12.5 | ||
environment: | ||
POSTGRES_USER: cfp_app | ||
POSTGRES_DB: cfp_app_test | ||
POSTGRES_PASSWORD: "" | ||
POSTGRES_HOST_AUTH_METHOD: trust | ||
steps: | ||
- browser-tools/install-browser-tools | ||
- checkout | ||
- run: | | ||
ruby --version | ||
node --version | ||
java --version | ||
google-chrome --version | ||
- run: gem install bundler | ||
- run: yarn install | ||
|
||
# Restore Cached gem Dependencies | ||
- restore_cache: | ||
keys: | ||
- cfp_app-gems-{{ checksum "Gemfile.lock" }} | ||
- cfp_app-gems- | ||
# Restore Cached node module Dependencies | ||
- restore_cache: | ||
keys: | ||
- cfp_app-packages-{{ checksum "yarn.lock" }} | ||
- cfp_app-packages- | ||
|
||
# Bundle install dependencies | ||
- run: bundle config set path 'vendor/bundle' | ||
- run: bundle install | ||
|
||
## Cache Dependencies | ||
|
||
# Generate this fallback cache first because the most recent match | ||
# will be used even if there is a more precise match | ||
- save_cache: | ||
key: cfp_app-gems- | ||
paths: | ||
- vendor/bundle | ||
# Generate a cache for this exact Gemfile.lock | ||
- save_cache: | ||
key: cfp_app-gems-{{ checksum "Gemfile.lock" }} | ||
paths: | ||
- vendor/bundle | ||
# Generate a fallback cache of node packages | ||
- save_cache: | ||
key: cfp_app-packages- | ||
paths: | ||
- node_modules | ||
# Generate a cache for this exact yarn.lock | ||
- save_cache: | ||
key: cfp_app-packages-{{ checksum "yarn.lock" }} | ||
paths: | ||
- node_modules | ||
|
||
# Wait for DB | ||
- run: dockerize -wait tcp://localhost:5432 -timeout 1m | ||
|
||
# Setup the database | ||
- run: bundle exec rake db:setup | ||
|
||
# Run the tests | ||
- run: bin/rake | ||
|
||
# Store failed js spec artifacts | ||
- store_artifacts: | ||
path: tmp/screenshots |
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,11 @@ | ||
# 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://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates | ||
|
||
version: 2 | ||
updates: | ||
- package-ecosystem: "bundler" # See documentation for possible values | ||
directory: "/" # Location of package manifests | ||
schedule: | ||
interval: "weekly" |
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,15 @@ | ||
Title | ||
|
||
Reason for Change | ||
================= | ||
* | ||
|
||
Changes | ||
======= | ||
* | ||
|
||
Minor | ||
===== | ||
* | ||
|
||
https://link.to/task_tracker_card |
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,17 @@ | ||
name: Deploy | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: akhileshns/[email protected] # This is the action | ||
with: | ||
heroku_api_key: ${{secrets.HEROKU_API_KEY}} | ||
heroku_app_name: "cfp-next-staging" #Must be unique in Heroku | ||
heroku_email: "[email protected]" |
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: Test | ||
|
||
on: | ||
push: | ||
pull_request: | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
|
||
services: | ||
postgres: | ||
image: postgres | ||
env: | ||
POSTGRES_HOST_AUTH_METHOD: trust | ||
ports: | ||
- 5432:5432 | ||
options: --health-cmd="pg_isready" --health-interval=10s --health-timeout=5s --health-retries=3 | ||
|
||
steps: | ||
- run: sudo apt-get update && sudo apt-get install --no-install-recommends -y google-chrome-stable curl libvips postgresql-client libpq-dev | ||
|
||
- uses: actions/checkout@v4 | ||
|
||
- uses: ruby/setup-ruby@v1 | ||
with: | ||
bundler-cache: true | ||
|
||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: '15.14.0' | ||
|
||
- name: Run tests | ||
env: | ||
RAILS_ENV: test | ||
DATABASE_URL: postgres://postgres@localhost:5432/cfp_app_test | ||
run: bin/rails db:setup assets:precompile spec | ||
|
||
- name: Keep screenshots from failed system tests | ||
uses: actions/upload-artifact@v4 | ||
if: failure() | ||
with: | ||
name: screenshots | ||
path: ${{ github.workspace }}/tmp/capybara | ||
if-no-files-found: ignore |
Oops, something went wrong.