Use official setup-ruby action

This commit is contained in:
Georg Gadinger 2022-01-06 21:20:29 +01:00
parent 88bee91f68
commit d8f38962d3
1 changed files with 10 additions and 17 deletions

View File

@ -35,34 +35,27 @@ jobs:
POSTGRES_PASSWORD: postgres POSTGRES_PASSWORD: postgres
POSTGRES_DB: justask_test POSTGRES_DB: justask_test
# used by setup-ruby with bundler-cache
BUNDLE_JOBS: '4'
BUNDLE_RETRY: '3'
BUNDLE_WITHOUT: 'production'
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- uses: actions/cache@v1 - 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: with:
path: vendor/bundle bundler-cache: true
key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}
restore-keys: |
${{ runner.os }}-gems-
- name: Set up Ruby 2.7
uses: actions/setup-ruby@v1
with:
ruby-version: 2.7.x
- name: Set up Node 12 - name: Set up Node 12
uses: actions/setup-node@v1 uses: actions/setup-node@v1
with: with:
node-version: '12' node-version: '12'
- name: Install dependencies
run: sudo apt update && sudo apt-get install -y libpq-dev libxml2-dev libxslt1-dev libmagickwand-dev imagemagick libidn11-dev
- name: Copy default configuration - name: Copy default configuration
run: | run: |
cp config/database.yml.postgres config/database.yml cp config/database.yml.postgres config/database.yml
cp config/justask.yml.example config/justask.yml cp config/justask.yml.example config/justask.yml
- name: Install gems
run: |
gem install bundler
bundle config path vendor/bundle
bundle config set without 'production'
bundle install --jobs 4 --retry 3
- name: Install node modules - name: Install node modules
run: | run: |
npm i -g yarn npm i -g yarn