Skip to content

Make process_image and retransfer_images scripts touch the obs when thumb image is transferred #13138

Make process_image and retransfer_images scripts touch the obs when thumb image is transferred

Make process_image and retransfer_images scripts touch the obs when thumb image is transferred #13138

Workflow file for this run

# GitHub Actions Continuous Integration of MO Rails Code
# Runs the tests and publishes the results to Coveralls
name: Continuous Integration
on:
push:
# branches: main
branches:
- "*" # Run on pushes on all branches
pull_request:
branches: main
jobs:
test:
runs-on: ubuntu-22.04
steps:
# check-out repo under $GITHUB_WORKSPACE, so that workflow can access it.
# https://github.com/actions/checkout
- name: Checkout code
uses: actions/checkout@v4
# https://github.com/ruby/setup-ruby
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
bundler-cache: true # runs bundle install, caches gems
- name: Install additional tools
run: sudo apt-get install exiftool
- name: Install Chrome/Chromium
run: sudo apt-get install chromium-browser
# MySQL is installed but does not run by default
# https://github.com/actions/virtual-environments/blob/main/images/linux/Ubuntu2004-README.md#mysql
- name: Start mySQL
run: sudo systemctl start mysql.service
# https://github.com/trilogy-libraries/activerecord-trilogy-adapter/issues/64
# Issue in the trilogy gem where it cannot support `caching_sha2_password`
# https://github.com/trilogy-libraries/trilogy/issues/26
# For now need to ensure user is IDENTIFIED WITH `mysql_native_password`
# (change is in db/initialize.sql)
- name: Create and configure db
run: |
mysql -u root -proot < db/initialize.sql
cp db/vagrant/database.yml config
- name: Create test image directories
run: |
for dir in images test_images;
do
for subdir in thumb 320 640 960 1280 orig;
do
mkdir -p public/$dir/$subdir
done
done
- name: install exifautotran
run: |
sudo cp script/exifautotran /usr/local/bin/exifautotran
sudo chmod 755 /usr/local/bin/exifautotran
- name: Load fixtures
run: |
bundle exec rake db:schema:load
bundle exec rake db:fixtures:load
- name: Update translation files
run: bundle exec rake lang:update
# And finally we can run the test suite
- name: Run tests
env:
RAILS_MASTER_KEY: ${{ secrets.RAILS_MASTER_KEY }}
run: bundle exec rails test:all
# https://github.com/marketplace/actions/coveralls-github-action
- name: Coveralls
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: ./coverage/lcov/lcov.info
# https://github.com/devmasx/brakeman-linter-action
# Temporarily disable brakeman in CI because it causes an error
# See https://github.com/MushroomObserver/mushroom-observer/issues/1514
# Instead use brakeman's plugin. See .codeclimate.yml
# JDC 2023-06-05
# - name: brakeman report
# run: |
# bundle exec brakeman -f json > brakeman.json || exit 0
# - name: Brakeman
# uses: devmasx/brakeman-linter-action@v1.0.0
# env:
# GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
# REPORT_PATH: brakeman.json