Skip to content
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

CI on GitHub Actions #388

Merged
merged 3 commits into from
Nov 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 45 additions & 0 deletions .github/workflows/test.yml
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
2 changes: 1 addition & 1 deletion .node-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
15.4.0
15.14.0
1 change: 0 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -101,5 +101,4 @@ group :development, :test do
gem 'selenium-webdriver'
gem 'spring'
gem 'timecop'
gem 'webdrivers', '~> 4.7'
end
5 changes: 0 additions & 5 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -512,10 +512,6 @@ GEM
activemodel (>= 6.0.0)
bindex (>= 0.4.0)
railties (>= 6.0.0)
webdrivers (4.7.0)
nokogiri (~> 1.6)
rubyzip (>= 1.3.0)
selenium-webdriver (> 3.141, < 5.0)
webpacker (5.4.4)
activesupport (>= 5.2)
rack-proxy (>= 0.6.1)
Expand Down Expand Up @@ -611,7 +607,6 @@ DEPENDENCIES
uglifier (>= 1.3.0)
underscore-rails
web-console
webdrivers (~> 4.7)
webpacker

RUBY VERSION
Expand Down