Bump rails-html-sanitizer from 1.6.0 to 1.6.1 #140
Workflow file for this run
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
env: | |
POSTGRES_USER: postgres | |
POSTGRES_PASSWORD: postgres | |
POSTGRES_DB: dynamic_image_test | |
VIPS_VERSION: 8.13.2 | |
name: Build | |
on: | |
push: | |
branches: | |
- main | |
- develop | |
pull_request: | |
jobs: | |
rubocop-test: | |
name: Rubocop | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
if: "!contains(github.event.head_commit.message, '[ci skip]')" | |
steps: | |
- uses: actions/checkout@v1 | |
- uses: ruby/setup-ruby@v1 | |
with: | |
bundler-cache: true | |
ruby-version: 3.3 | |
- name: Check code | |
run: bundle exec rubocop | |
rspec-test: | |
name: RSpec | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
ruby: ['3.2', '3.3'] | |
services: | |
postgres: | |
image: postgres:latest | |
ports: | |
- 5432:5432 | |
env: | |
POSTGRES_USER: ${{ env.POSTGRES_USER }} | |
POSTGRES_PASSWORD: ${{ env.POSTGRES_PASSWORD }} | |
POSTGRES_DB: ${{ env.POSTGRES_DB }} | |
options: >- | |
--health-cmd pg_isready | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
steps: | |
- uses: actions/checkout@v1 | |
- uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: ${{ matrix.ruby }} | |
bundler-cache: true | |
- name: Install system dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y libtiff5-dev libgsf-1-dev libgif-dev giflib-tools libwebp-dev libheif-dev libimagequant-dev | |
sudo add-apt-repository ppa:lovell/cgif | |
sudo apt-get install libcgif-dev | |
- name: Vips cache | |
uses: actions/cache@v1 | |
with: | |
path: vips-${{ env.VIPS_VERSION }} | |
key: ${{ runner.os }}-vips-${{ env.VIPS_VERSION }} | |
restore-keys: | | |
${{ runner.os }}-vips- | |
- name: Build libvips from source | |
run: | | |
wget https://github.com/libvips/libvips/releases/download/v${{ env.VIPS_VERSION }}/vips-${{ env.VIPS_VERSION }}.tar.gz | |
tar xf vips-${{ env.VIPS_VERSION }}.tar.gz | |
cd vips-${{ env.VIPS_VERSION }} | |
./configure | |
make | |
sudo make install | |
sudo ldconfig | |
- name: Create database | |
env: | |
DB: postgres | |
RAILS_ENV: test | |
PGHOST: localhost | |
PGUSER: ${{ env.POSTGRES_USER }} | |
PGPASSWORD: ${{ env.POSTGRES_PASSWORD }} | |
run: | | |
bundle exec rake db:migrate | |
- name: Run tests | |
env: | |
DB: postgres | |
PGHOST: localhost | |
PGUSER: ${{ env.POSTGRES_USER }} | |
PGPASSWORD: ${{ env.POSTGRES_PASSWORD }} | |
run: bundle exec rspec | |
- name: Send results to Code Climate | |
uses: paambaati/codeclimate-action@v5.0.0 | |
env: | |
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }} | |
with: | |
coverageCommand: ls |