-
Notifications
You must be signed in to change notification settings - Fork 494
53 lines (51 loc) · 1.49 KB
/
next-rails.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
name: Next-rails
on:
pull_request:
branches:
- master
workflow_dispatch:
jobs:
next-rails:
if: contains(github.head_ref, 'next-rails')
runs-on: ubuntu-latest
name: next-rails
env:
OSEM_DB_HOST: localhost
RAILS_ENV: test
strategy:
matrix:
suite: [models, features, controllers, ability, leftovers]
fail-fast: false
steps:
- uses: actions/checkout@v4
- name: Sets env vars for next-rails
run: |
echo "BUNDLE_GEMFILE=Gemfile.next" >> $GITHUB_ENV
echo "BUNDLE_CACHE_PATH=vendor/cache.next" >> $GITHUB_ENV
- uses: ruby/setup-ruby@v1
with:
bundler-cache: true
- name: Prepare spec
run: |
bundle exec rake db:setup --trace
bundle exec bin/rails webdrivers:chromedriver:update
- name: spec/${{ matrix.suite }}
run: bundle exec rake spec:${{ matrix.suite }}
- name: coverage upload ${{ matrix.suite }}
uses: codacy/codacy-coverage-reporter-action@master
if: github.ref == 'refs/heads/master'
with:
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
coverage-reports: coverage/coverage.xml
services:
postgres:
image: postgres:16-alpine
env:
POSTGRES_PASSWORD: mysecretpassword
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432