Skip to content

[ACUWT] Add indexes to article_course_user_wiki_timeslices #9061

[ACUWT] Add indexes to article_course_user_wiki_timeslices

[ACUWT] Add indexes to article_course_user_wiki_timeslices #9061

Workflow file for this run

name: CI
# Controls when the workflow will run
on: ['push', 'pull_request', 'workflow_dispatch']
jobs:
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
env:
SECRET_KEY_BASE: ci_secret_key_base_not_used_for_real_sessions
# Use native service containers instead of standalone actions
# to avoid Docker Hub rate limits and Docker client version mismatches.
services:
redis:
image: redis:7
ports:
- 6379:6379
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
mariadb:
image: mariadb:10.5
env:
MARIADB_DATABASE: dashboard_testing
MARIADB_USER: wiki
MARIADB_PASSWORD: wikiedu
MARIADB_ROOT_PASSWORD: wikiedu
ports:
- 3306:3306
options: >-
--health-cmd "healthcheck.sh --connect --innodb_initialized"
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
# checks-out your repository under $GITHUB_WORKSPACE , so that workflow can access it.
- name: checkout
uses: actions/checkout@v2
with:
fetch-depth: 2
- name: install Pandoc
uses: r-lib/actions/setup-pandoc@v2
with:
pandoc-version: '2.9.2.1'
- name: install ImageMagick
uses: mfinelli/setup-imagemagick@v6
with:
cache: true
# Cache ImageMagick binaries
- name: Cache Latest ImageMagick
uses: actions/cache@v3
with:
path: /home/runner/bin/magick
key: ${{ runner.os }}-imagemagick-latest
restore-keys: |
${{ runner.os }}-imagemagick-latest
# Update PATH for ImageMagick
- name: Update PATH for ImageMagick
run: echo "/home/runner/bin" >> $GITHUB_PATH
- name: Create symlink for identify and convert
run: |
for cmd in identify convert; do
if ! [ -x "$(command -v $cmd)" ]; then
sudo ln -s $(which magick) /usr/bin/$cmd
fi
done
# Starting ruby
- name: setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.4.8
bundler-cache: true
- name: setup Node
uses: actions/setup-node@v3
with:
node-version: '22'
cache: 'yarn'
- name: Grant parallel DB permissions
run: |
mysql -h 127.0.0.1 -P 3306 -u root -pwikiedu \
-e "GRANT ALL PRIVILEGES ON \`dashboard_testing%\`.* TO 'wiki'@'%'; FLUSH PRIVILEGES;"
- name: setup Dashboard database
env:
RAILS_ENV: test
DATABASE_PORT: 3306
run: |
mkdir tmp -m 777
cp config/application.example.yml config/application.yml
cp config/database.example.yml config/database.yml
bundle exec rake parallel:create[3] parallel:load_schema[3]
- name: Check eager loading (catch autoloading issues)
env:
RAILS_ENV: test
DATABASE_PORT: 3306
run: bundle exec rails runner "Rails.application.eager_load!"
# Boots the app with the same gem set that gets deployed to staging
# and production (i.e. --without development test). Catches missing
# `require`s for gems that are only pulled in transitively by test
# dependencies on developer machines.
- name: Check eager loading against deployed gem set
env:
RAILS_ENV: staging
DATABASE_PORT: 3306
BUNDLE_WITHOUT: "development:test"
run: bundle exec rails runner "Rails.application.eager_load!"
- name: Cache Webpack cache
id: cache-webpack
uses: actions/cache@v3
with:
path: node_modules/.cache/
key: ${{ runner.os }}-webpack
# Create cache or restore cache for Tests
- name: Cache VCR cassettes
uses: actions/cache@v3
with:
path: fixtures/vcr_cassettes
key: vcr-cached-v1
restore-keys: |
vcr-cached-
#Testing the pushed code onwards
- name: JavaScript test suite
run: |
yarn install --immutable
yarn coverage
yarn run test
- name: JavaScript linting
run: yarn lint-non-build
- name: Cache parallel runtime log
uses: actions/cache@v3
with:
path: tmp/parallel_runtime_rspec.log
key: parallel-runtime-${{ hashFiles('spec/**/*_spec.rb') }}
restore-keys: parallel-runtime-
- name: Ruby rspec test suite
env:
COVERAGE: true
run: bundle exec parallel_rspec spec/ -n 3 --runtime-log tmp/parallel_runtime_rspec.log
- name: Generate JS coverage report
if: success()
env:
COVERAGE: true
run: |
bundle exec rake generate:coverage
{
echo '## JavaScript coverage (from feature specs)'
echo ''
echo '```'
npx nyc report --reporter=text-summary
echo '```'
} | tee -a "$GITHUB_STEP_SUMMARY"
- name: Upload JS coverage report
uses: actions/upload-artifact@v4
if: success()
with:
name: js-coverage
path: public/js_coverage/
if-no-files-found: warn
- name: Archive capybara failure screenshots
uses: actions/upload-artifact@v4
if: failure()
with:
name: dist-without-markdown
path: tmp/screenshots/*.png
if-no-files-found: ignore
- name: Check whitespace
run: git diff --check HEAD~1
- name: Ruby linting
run: bundle exec rubocop