mirror of
https://github.com/Retrospring/retrospring.git
synced 2024-11-20 14:19:53 +01:00
c631987488
Bumps [actions/checkout](https://github.com/actions/checkout) from 4.2.1 to 4.2.2. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v4.2.1...v4.2.2) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
81 lines
2.2 KiB
YAML
81 lines
2.2 KiB
YAML
name: Retrospring
|
|
|
|
on:
|
|
push:
|
|
branches: [ main ]
|
|
pull_request:
|
|
branches: [ main ]
|
|
|
|
jobs:
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
services:
|
|
postgres:
|
|
image: postgres:10.12
|
|
env:
|
|
POSTGRES_USER: postgres
|
|
POSTGRES_PASSWORD: postgres
|
|
POSTGRES_DB: justask_test
|
|
ports:
|
|
- 5432/tcp
|
|
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
|
|
redis:
|
|
image: redis
|
|
ports:
|
|
- 6379:6379
|
|
options: --entrypoint redis-server
|
|
|
|
env:
|
|
RAILS_ENV: test
|
|
NODE_ENV: test
|
|
POSTGRES_HOST: localhost
|
|
POSTGRES_USER: postgres
|
|
POSTGRES_PASSWORD: postgres
|
|
POSTGRES_DB: justask_test
|
|
|
|
# used by setup-ruby with bundler-cache
|
|
BUNDLE_JOBS: '4'
|
|
BUNDLE_RETRY: '3'
|
|
BUNDLE_WITHOUT: 'production'
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4.2.2
|
|
- name: Install dependencies
|
|
run: sudo apt update && sudo apt-get install -y libpq-dev libxml2-dev libxslt1-dev libmagickwand-dev imagemagick libidn11-dev
|
|
- name: Set up Ruby
|
|
uses: ruby/setup-ruby@v1
|
|
with:
|
|
bundler-cache: true
|
|
- name: Set up Node 16
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: '16'
|
|
cache: 'yarn'
|
|
- name: Copy default configuration
|
|
run: |
|
|
cp config/database.yml.postgres config/database.yml
|
|
cp config/justask.yml.example config/justask.yml
|
|
- name: Install node modules
|
|
run: |
|
|
npm i -g yarn
|
|
yarn install --frozen-lockfile
|
|
- name: Export i18n JS files
|
|
run: bundle exec i18n export
|
|
- name: Compile assets
|
|
run:
|
|
bundle exec rake assets:precompile
|
|
- name: Set up database
|
|
run: bundle exec rake db:setup
|
|
env:
|
|
POSTGRES_PORT: ${{ job.services.postgres.ports[5432] }}
|
|
- name: Run tests
|
|
run: bundle exec rake spec
|
|
env:
|
|
POSTGRES_PORT: ${{ job.services.postgres.ports[5432] }}
|
|
REDIS_URL: "redis://localhost:${{ job.services.redis.ports[6379] }}"
|
|
- uses: codecov/codecov-action@v4
|
|
with:
|
|
token: ${{ secrets.CODECOV_TOKEN }}
|
|
file: ./coverage/coverage.xml
|