Skip to content

Improve product attachments frontend #818

Improve product attachments frontend

Improve product attachments frontend #818

Workflow file for this run

name: CI RSpec Tests
on:
pull_request:
jobs:
build:
name: CI
runs-on: ubuntu-latest
container:
image: ruby:3.0.0
services:
postgres:
image: pgvector/pgvector:pg16
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: "password"
POSTGRES_DB: postgres
ports: ["5432:5432"]
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
redis:
image: redis
ports: ["6379:6379"]
steps:
- uses: actions/checkout@v3
with:
submodules: 'true'
- uses: actions/setup-node@v1
with:
node-version: '16.16.0'
registry-url: 'https://registry.npmjs.org'
- name: Load Env variables
uses: cardinalby/export-env-action@v1
with:
envFile: '.env.github'
expand: 'true'
- run: |
apt-get update
apt-get install -y libnss3-dev libgdk-pixbuf2.0-dev libgtk-3-dev libxss-dev libasound2 sudo
- run: |
wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add -
sh -c 'echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list'
apt-get update && apt-get install -y sudo google-chrome-stable
- name: Load Chrome Driver
uses: nanasess/setup-chromedriver@v1
with:
# Optional: do not specify to match Chrome's version
chromedriver-version: '88.0.4324.96'
- run: |
export DISPLAY=:99
chromedriver --url-base=/wd/hub &
sudo Xvfb -ac :99 -screen 0 1280x1024x24 > /dev/null 2>&1 & # optional
- run: google-chrome-stable --version
- name: Bundle install
run: |
gem install bundler
bundle install --jobs 4 --retry 3 --path vendor/bundle
- name: Install yarn
run: npm install -g yarn
- name: Yarn build
run: yarn build
- name: Setup Database
run: bin/rails db:create db:schema:load
- name: Setup assets
run: bundle exec rails assets:clean assets:precompile
- name: Run tests
run: bundle exec rspec
- name: Publish code coverage
uses: paambaati/codeclimate-action@v5.0.0
env:
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}