A platform for community discussion. Free, open, simple.
DEV: Use discourse/discourse_test in CI workflows
Jarek Radoszabe688beb3a8
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.ymlindex 1617a743a2d..8c1b8ef64e7 100644--- a/.github/workflows/ci.yml+++ b/.github/workflows/ci.yml@@ -12,6 +12,7 @@ jobs:build:name: "${{ matrix.target }}-${{ matrix.build_types }}"runs-on: ${{ matrix.os }}+ container: discourse/discourse_test:releasetimeout-minutes: 60env:@@ -20,7 +21,7 @@ jobs:BUILD_TYPE: ${{ matrix.build_types }}TARGET: ${{ matrix.target }}RAILS_ENV: test- PGHOST: localhost+ PGHOST: postgresPGUSER: discoursePGPASSWORD: discourse@@ -61,49 +62,27 @@ jobs:git config --global user.email "[email protected]"git config --global user.name "Discourse CI"- - name: Setup packages- if: env.BUILD_TYPE != 'LINT'- run: |- sudo apt-get update- sudo apt-get -yqq install postgresql-client libpq-dev jpegoptim optipng jhead pngcrush pngquant- wget -qO- https://raw.githubusercontent.com/discourse/discourse_docker/master/image/base/install-pngquant | sudo sh-- - name: Update imagemagick- if: env.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 redisuses: shogo82148/actions-setup-redis@v1if: env.BUILD_TYPE != 'LINT'with:redis-version: ${{ matrix.redis }}- - name: Setup ruby- uses: actions/setup-ruby@v1- with:- ruby-version: ${{ matrix.ruby }}-- - name: Setup bundler- run: |- gem install bundler -v 2.1.4 --no-doc- bundle config deployment 'true'- bundle config without 'development'- bundle config path vendor/bundle-- name: Bundler cacheuses: actions/cache@v2- id: bundler-cachewith:path: vendor/bundle- key: ${{ runner.os }}-gem-${{ hashFiles('**/Gemfile.lock') }}+ key: ${{ runner.os }}-${{ matrix.ruby }}-gem-${{ hashFiles('**/Gemfile.lock') }}restore-keys: |- ${{ runner.os }}-gem-+ ${{ runner.os }}-${{ matrix.ruby }}-gem-- name: Setup gems- run: bundle install --jobs 4+ run: |+ bundle config --local path vendor/bundle+ bundle config --local deployment true+ bundle config --local without development+ bundle install --jobs 4+ bundle clean- name: Get yarn cache directoryid: yarn-cache-dirdiff --git a/lib/tasks/qunit.rake b/lib/tasks/qunit.rakeindex a9386f1d166..405e932cc64 100644--- a/lib/tasks/qunit.rake+++ b/lib/tasks/qunit.rake@@ -109,6 +109,7 @@ task "qunit:test", [:timeout, :qunit_path] do |_, args|ensure# was having issues with HUPProcess.kill "KILL", pid+ FileUtils.rm("#{Rails.root}/tmp/pids/unicorn_test_#{port}.pid")endif success