DEV: Update CI workflows (#144)

* DEV: Update CI workflows

* DEV: Update Gemfile.lock

Co-authored-by: CvX <CvX@users.noreply.github.com>
Co-authored-by: Justin DiRose <justin@justindirose.com>
This commit is contained in:
discoursebot 2021-02-11 10:18:24 -06:00 committed by GitHub
parent b560cf1002
commit b3367ba9d2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 20 additions and 23 deletions

View File

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

View File

@ -11,13 +11,14 @@ jobs:
build: build:
name: ${{ matrix.build_type }} name: ${{ matrix.build_type }}
runs-on: ubuntu-latest runs-on: ubuntu-latest
container: discourse/discourse_test:release
timeout-minutes: 60 timeout-minutes: 60
env: env:
DISCOURSE_HOSTNAME: www.example.com DISCOURSE_HOSTNAME: www.example.com
RUBY_GLOBAL_METHOD_CACHE_SIZE: 131072 RUBY_GLOBAL_METHOD_CACHE_SIZE: 131072
RAILS_ENV: test RAILS_ENV: test
PGHOST: localhost PGHOST: postgres
PGUSER: discourse PGUSER: discourse
PGPASSWORD: discourse PGPASSWORD: discourse
@ -74,29 +75,26 @@ jobs:
git config --global user.email "ci@ci.invalid" git config --global user.email "ci@ci.invalid"
git config --global user.name "Discourse CI" 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 - name: Setup redis
uses: shogo82148/actions-setup-redis@v1 uses: shogo82148/actions-setup-redis@v1
with: with:
redis-version: ${{ matrix.redis }} redis-version: ${{ matrix.redis }}
- name: Setup ruby - name: Bundler cache
uses: ruby/setup-ruby@v1 uses: actions/cache@v2
with: with:
ruby-version: ${{ matrix.ruby }} path: vendor/bundle
bundler-cache: true 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 - name: Lint English locale
if: matrix.build_type == 'backend' if: matrix.build_type == 'backend'
@ -116,7 +114,7 @@ jobs:
${{ runner.os }}-${{ matrix.os }}-yarn- ${{ runner.os }}-${{ matrix.os }}-yarn-
- name: Yarn install - name: Yarn install
run: yarn install --dev run: yarn install
- name: Migrate database - name: Migrate database
run: | run: |

View File

@ -1,4 +1,5 @@
GEM GEM
remote: https://rubygems.org/
specs: specs:
ast (2.4.0) ast (2.4.0)
jaro_winkler (1.5.4) jaro_winkler (1.5.4)