|
4 | 4 | push:
|
5 | 5 | branches:
|
6 | 6 | - 'main'
|
| 7 | + - 'nc-prepare-ci-for-rails-8' |
7 | 8 | pull_request:
|
8 | 9 | types: [opened, synchronize, reopened]
|
9 | 10 |
|
|
34 | 35 | --health-retries 5
|
35 | 36 | steps:
|
36 | 37 | - uses: actions/checkout@v4
|
37 |
| - - uses: ./.github/actions/setup |
| 38 | + - name: Set up Ruby ${{ matrix.ruby }} |
| 39 | + uses: ruby/setup-ruby@v1 |
38 | 40 | with:
|
39 | 41 | ruby-version: ${{ matrix.ruby }}
|
| 42 | + bundler-cache: true |
| 43 | + - name: Set up JS |
| 44 | + uses: actions/setup-node@v4 |
| 45 | + with: |
| 46 | + cache: yarn |
| 47 | + - name: Install Ruby dependencies |
| 48 | + run: bundle install |
| 49 | + - name: Install Appraisal dependencies |
| 50 | + run: bundle exec appraisal install |
| 51 | + - name: Install JS dependencies |
| 52 | + run: yarn install |
| 53 | + - name: Setup the environment |
| 54 | + run: cp .sample.env .env |
| 55 | + - run: cp spec/example_app/config/database.yml.sample spec/example_app/config/database.yml |
| 56 | + - name: Setup the database |
| 57 | + run: bundle exec rake db:setup |
| 58 | + - name: Build assets |
| 59 | + run: yarn run build && yarn run build:css |
40 | 60 | - name: Run tests
|
41 | 61 | run: bundle exec rspec
|
42 | 62 |
|
|
70 | 90 | --health-retries 5
|
71 | 91 | steps:
|
72 | 92 | - uses: actions/checkout@v4
|
73 |
| - - uses: ./.github/actions/setup |
| 93 | + - name: Setup the environment |
| 94 | + run: cp .sample.env .env |
| 95 | + - run: cp spec/example_app/config/database.yml.sample spec/example_app/config/database.yml |
| 96 | + - name: Prepare main database schema |
| 97 | + run: bin/generate-database-schema |
| 98 | + - name: Set up Ruby ${{ matrix.ruby }} |
| 99 | + uses: ruby/setup-ruby@v1 |
74 | 100 | with:
|
75 | 101 | ruby-version: ${{ matrix.ruby }}
|
76 |
| - - name: Appraise Rails ${{ matrix.appraisal }} |
77 |
| - run: bundle exec appraisal ${{ matrix.appraisal }} rspec |
| 102 | + - name: Set up JS |
| 103 | + uses: actions/setup-node@v4 |
| 104 | + with: |
| 105 | + cache: yarn |
| 106 | + - name: Remove Ruby version specification |
| 107 | + run: sed -i 's/^ruby\(.*\)//g' gemfiles/${{ matrix.appraisal }}.gemfile |
| 108 | + - name: Install Ruby dependencies |
| 109 | + run: bundle install |
| 110 | + env: |
| 111 | + BUNDLE_GEMFILE: gemfiles/${{ matrix.appraisal }}.gemfile |
| 112 | + - name: Install JS dependencies |
| 113 | + run: yarn install |
| 114 | + - name: Build assets |
| 115 | + run: yarn run build && yarn run build:css |
| 116 | + - name: Run tests |
| 117 | + run: bundle exec rspec |
| 118 | + env: |
| 119 | + BUNDLE_GEMFILE: gemfiles/${{ matrix.appraisal }}.gemfile |
0 commit comments