This commit is contained in:
@@ -0,0 +1,48 @@
|
||||
name: CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [master]
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
test:
|
||||
name: Test
|
||||
runs-on: ubuntu-latest
|
||||
container: gitea.kosmos.org/kosmos/akkounts-ci:0.9.1
|
||||
services:
|
||||
redis:
|
||||
image: redis
|
||||
options: >-
|
||||
--health-cmd "redis-cli ping"
|
||||
--health-interval 10s
|
||||
--health-timeout 5s
|
||||
--health-retries 5
|
||||
env:
|
||||
RAILS_ENV: test
|
||||
REDIS_URL: redis://redis:6379/0
|
||||
RS_REDIS_URL: redis://redis:6379/1
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Install Ruby dependencies
|
||||
run: |
|
||||
bundle config unset deployment
|
||||
bundle config set cache_all 'true'
|
||||
bundle config set cache_path 'vendor/cache'
|
||||
bundle config set with 'development test'
|
||||
bundle install --jobs=3 --retry=3
|
||||
|
||||
- name: Prepare database
|
||||
run: |
|
||||
bundle exec rails db:create
|
||||
bundle exec rails db:migrate
|
||||
|
||||
- name: Install JS dependencies
|
||||
run: yarn install
|
||||
|
||||
- name: Build CSS
|
||||
run: bundle exec rake css:build
|
||||
|
||||
- name: Run tests
|
||||
run: bundle exec rspec
|
||||
Reference in New Issue
Block a user