This repository has been archived by the owner on Oct 11, 2023. It is now read-only.
Bump selenium-webdriver and webdrivers (#962) #875
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: System tests | |
on: | |
push: | |
branches: [ main ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
services: | |
postgres: | |
image: postgres:13 | |
env: | |
POSTGRES_USER: postgres | |
POSTGRES_PASSWORD: postgres | |
POSTGRES_DB: ci_test | |
ports: | |
- 5432:5432 | |
# needed because the postgres container does not provide a healthcheck | |
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 | |
steps: | |
- name: Increase the amount of inotify watchers | |
run: | | |
sudo sh -c "echo fs.inotify.max_user_watches=524288 >> /etc/sysctl.conf" | |
sudo sysctl -p | |
- name: Checkout repository and submodules | |
uses: actions/checkout@v2 | |
with: | |
submodules: recursive | |
- name: Setup Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: 3.1.2 | |
bundler-cache: true | |
- name: Install bundler | |
run: | | |
gem install bundler | |
bundle config path vendor/bundle | |
- uses: actions/cache@v2 | |
with: | |
path: vendor/bundle | |
key: ${{ runner.os }}-gems--${{ hashFiles('**/Gemfile.lock') }} | |
restore-keys: | | |
${{ runner.os }}-gems-- | |
- name: Install gems | |
if: steps.bundler-cache.outputs.cache-hit != 'true' | |
run: bundle install --jobs 4 --retry 3 | |
- name: Find yarn cache location | |
id: yarn-cache-dir | |
run: echo "::set-output name=dir::$(yarn cache dir)" | |
- name: JS package cache | |
uses: actions/cache@v2 | |
id: yarn-cache | |
with: | |
path: ${{ steps.yarn-cache-dir.outputs.dir }} | |
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | |
restore-keys: | | |
${{ runner.os }}-yarn- | |
- name: Install packages | |
if: steps.yarn-cache.outputs.cache-hit != 'true' | |
run: yarn install --check-files | |
- name: Setup Database | |
env: | |
RAILS_ENV: test | |
POSTGRES_HOST: 127.0.0.1 | |
POSTGRES_USER: postgres | |
POSTGRES_PASSWORD: postgres | |
POSTGRES_PORT: ${{ job.services.postgres.ports[5432] }} | |
run: | | |
cp config/database.ci.yml config/database.yml | |
bundle exec rails db:schema:load | |
- name: Run system tests | |
env: | |
RAILS_ENV: test | |
POSTGRES_HOST: 127.0.0.1 | |
POSTGRES_USER: postgres | |
POSTGRES_PASSWORD: postgres | |
POSTGRES_PORT: ${{ job.services.postgres.ports[5432] }} | |
run: | | |
bundle exec rails assets:precompile | |
bundle exec rails test:system |