DEV: Update CI workflows (#62)

Co-authored-by: CvX <CvX@users.noreply.github.com>
This commit is contained in:
discoursebot 2021-03-18 00:30:04 -05:00 committed by GitHub
parent 8c166e1b06
commit 198469ee77
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 19 additions and 23 deletions

View File

@ -23,12 +23,10 @@ jobs:
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7
- name: Setup gems
run: bundle install --jobs 4
bundler-cache: true
- name: Yarn install
run: yarn install --dev
run: yarn install
- name: ESLint
run: yarn eslint --ext .js,.js.es6 --no-error-on-unmatched-pattern {test,assets}/javascripts

View File

@ -11,13 +11,14 @@ jobs:
build:
name: ${{ matrix.build_type }}
runs-on: ubuntu-latest
container: discourse/discourse_test:release
timeout-minutes: 60
env:
DISCOURSE_HOSTNAME: www.example.com
RUBY_GLOBAL_METHOD_CACHE_SIZE: 131072
RAILS_ENV: test
PGHOST: localhost
PGHOST: postgres
PGUSER: discourse
PGPASSWORD: discourse
@ -74,29 +75,26 @@ jobs:
git config --global user.email "ci@ci.invalid"
git config --global user.name "Discourse CI"
- name: Setup packages
run: |
sudo apt-get update
sudo apt-get -yqq install postgresql-client libpq-dev gifsicle jpegoptim optipng jhead
wget -qO- https://raw.githubusercontent.com/discourse/discourse_docker/master/image/base/install-pngquant | sudo sh
- name: Update imagemagick
if: matrix.build_type == 'backend'
run: |
wget https://raw.githubusercontent.com/discourse/discourse_docker/master/image/base/install-imagemagick
chmod +x install-imagemagick
sudo ./install-imagemagick
- name: Setup redis
uses: shogo82148/actions-setup-redis@v1
with:
redis-version: ${{ matrix.redis }}
- name: Setup ruby
uses: ruby/setup-ruby@v1
- name: Bundler cache
uses: actions/cache@v2
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
path: vendor/bundle
key: ${{ runner.os }}-${{ matrix.ruby }}-gem-${{ hashFiles('**/Gemfile.lock') }}
restore-keys: |
${{ runner.os }}-${{ matrix.ruby }}-gem-
- name: Setup gems
run: |
bundle config --local path vendor/bundle
bundle config --local deployment true
bundle config --local without development
bundle install --jobs 4
bundle clean
- name: Lint English locale
if: matrix.build_type == 'backend'
@ -116,7 +114,7 @@ jobs:
${{ runner.os }}-${{ matrix.os }}-yarn-
- name: Yarn install
run: yarn install --dev
run: yarn install
- name: Migrate database
run: |