Skip to content

Commit

Permalink
Change workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
fblupi committed Apr 10, 2024
1 parent e0585c2 commit 7ac6df5
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 15 deletions.
9 changes: 4 additions & 5 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ name: Lint
on:
push:
branches:
- master
- main
pull_request:

env:
RUBY_VERSION: 2.7.4
NODE_VERSION: 12.9.1
RUBY_VERSION: 2.7.5
NODE_VERSION: 16.9.1

jobs:
lint:
name: Lint code
Expand All @@ -34,4 +34,3 @@ jobs:

- run: bundle exec mdl *.md
name: Lint Markdown files

42 changes: 32 additions & 10 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,25 @@ name: Test
on:
push:
branches:
- master
- main
pull_request:

env:
RUBY_VERSION: 2.7.4
NODE_VERSION: 12.9.1
RUBY_VERSION: 2.7.5
NODE_VERSION: 16.9.1

jobs:
test:
name: Test
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
services:
postgres:
image: postgres:11
ports:
- 5432:5432
env:
DATABASE_USERNAME: postgres
DATABASE_PASSWORD: postgres
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_HOST_AUTH_METHOD: trust
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5

Expand All @@ -35,18 +35,40 @@ jobs:
ruby-version: ${{ env.RUBY_VERSION }}
bundler-cache: true

- uses: nanasess/setup-chromedriver@v2
with:
chromedriver-version: 119.0.6045.105

- name: List Chrome
shell: "bash"
run: apt list --installed | grep chrome

- name: Remove Chrome
shell: "bash"
run: sudo apt remove google-chrome-stable

- uses: browser-actions/setup-chrome@v1
with:
chrome-version: 119.0.6045.105

- name: Bundle Install
run: bundle install

- name: Setup & create Database
run: |
bundle exec rails db:create db:schema:load
run: bundle exec rake db:test:prepare
env:
RAILS_ENV: test
DATABASE_USERNAME: postgres
DATABASE_PASSWORD: postgres

- name: Precompile assets
run: bundle exec rake assets:precompile
run: |
npm ci
bundle exec rake assets:precompile
env:
RAILS_ENV: test
DATABASE_USERNAME: postgres
DATABASE_PASSWORD: postgres

- name: Run RSpec
run: SIMPLECOV=1 CODECOV=1 bundle exec rspec
Expand Down

0 comments on commit 7ac6df5

Please sign in to comment.