test assets precompilation #10
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: test assets precompilation | |
on: | |
workflow_dispatch: | |
jobs: | |
testing: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
shell: bash | |
container: complat/chemotion_eln_runner:main | |
services: | |
postgres: | |
image: postgres:16 # https://hub.docker.com/_/postgres | |
env: | |
POSTGRES_PASSWORD: postgres # env variable required by postgres Docker container | |
POSTGRES_USER: chemotion # optional env variable used in conjunction with POSTGRES_PASSWORD to set a user and their password | |
options: >- | |
--health-cmd pg_isready | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
steps: | |
- name: checkout repository | |
uses: actions/checkout@v4 | |
- name: configure repository | |
run: | | |
cd config | |
cp database.yml.ci database.yml | |
cp -f profile_default.yml.example profile_default.yml | |
cp -f shrine.yml.example shrine.yml | |
cp -f storage.yml.example storage.yml | |
touch klasses.json | |
bundle config set without '' | |
- name: bundle install | |
run: | | |
bundle install | |
echo "SECRET_KEY_BASE=$(bundle exec rake secret)" > .env | |
- name: yarn install | |
run: yarn install --production=false | |
# @todo user AR nulladapter (DISABLE_DATABASE_ENVIRONMENT_CHECK) instead of setting up a real db | |
- name: prepare postgres | |
run: | | |
RAILS_ENV=production bundle exec rake db:create | |
RAILS_ENV=production bundle exec rake db:schema:load | |
- name: precompile | |
run: RAILS_ENV=production bundle exec rake assets:precompile | |
- name: list browsers targets | |
run: yarn browserslist | |
- name: update-browserslist-db@latest | |
run: | | |
yarn add update-browserslist-db@latest | |
yarn update-browserslist-db | |