Skip to content

Bump the test-dependencies group across 1 directory with 4 updates #578

Bump the test-dependencies group across 1 directory with 4 updates

Bump the test-dependencies group across 1 directory with 4 updates #578

Workflow file for this run

name: Run tests
on:
push:
branches: [main]
paths-ignore: ['docs/**']
pull_request:
branches: [main]
paths-ignore: ['docs/**']
jobs:
test-ruby:
env:
RAILS_ENV: test
JWT_SECRET: "fake-but-ok"
name: Rails tests
runs-on: ubuntu-latest
# container: ubuntu:latest
services:
postgres:
image: postgres
env:
POSTGRES_PASSWORD: db_pass
ports: ["5432:5432"]
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
steps:
- name: Install build dependencies
run: |
sudo apt-get -y install libpq-dev
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: '3.3.1'
bundler-cache: true
# Increment to force re-installation of the gems.
cache-version: 1
- name: Setup database and create credentials
env:
POSTGRES_DB: ct-vis-test
POSTGRES_HOST: localhost
POSTGRES_PASSWORD: db_pass
POSTGRES_USER: postgres
run: |
bin/rails db:create
bin/rails db:schema:load
EDITOR=cat ./bin/rails credentials:edit
./bin/rails encryption:generate
- name: Run rails tests
env:
POSTGRES_DB: ct-vis-test
POSTGRES_HOST: localhost
POSTGRES_PASSWORD: db_pass
POSTGRES_USER: postgres
# FSR running ./bin/bundle exec rspec does not work; it complains about
# incompatible library versions. However, ./bin/rails spec works just
# fine. :shrug:.
run:
./bin/rails spec
test-javascript:
name: JavaScript tests
runs-on: ubuntu-latest
# container: ubuntu:latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20.x
cache: 'yarn'
- name: Install JavaScript testing dependencies
run: yarn install --frozen-lockfile
- name: Run JavaScript tests
run:
yarn run jest --all
check-dockerfile:
name: Check Dockerfile builds
runs-on: ubuntu-latest
timeout-minutes: 5
strategy:
fail-fast: true
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Run docker build
run: docker build .