Bug advanced search complex datation choices before #609
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: api | |
on: [push, pull_request] | |
env: | |
CI: gha | |
POSTGRES_USER: postgres | |
POSTGRES_PASSWORD: postgres | |
POSTGRES_DB: postgres | |
RAILS_ENV: test | |
jobs: | |
test: | |
name: RUBY${{ matrix.ruby-versions }} | |
runs-on: ubuntu-22.04 | |
strategy: | |
matrix: | |
ruby-versions: [ '3.2.2' ] | |
rubygems-version: [ '3.4.5' ] | |
psql-version: [ '15' ] | |
node-version: [ '20' ] | |
redis-version: [ '7' ] | |
services: | |
postgres: | |
image: postgres:${{ matrix.psql-version }} | |
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 | |
ports: | |
- 5432:5432 | |
redis: | |
image: redis:${{ matrix.redis-version }} | |
ports: ['6379:6379'] | |
options: --entrypoint redis-server | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
- name: Setup Node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Setup Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: ${{ matrix.ruby-versions }} | |
- name: Install RubyGems | |
run: gem update --system ${{ matrix.rubygems-version }} | |
- name: Cache Gems | |
uses: actions/cache@v4 | |
with: | |
path: vendor/bundle | |
key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }} | |
restore-keys: | | |
${{ runner.os }}-gems- | |
- name: Cache Yarn | |
uses: actions/cache@v4 | |
with: | |
path: ~/.cache/yarn | |
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | |
restore-keys: ${{ runner.os }}-yarn- | |
- name: Install PSQL client | |
run: | | |
sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list' | |
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add - | |
sudo apt-get update | |
sudo apt-get -y --no-install-recommends install "postgresql-client-${{ matrix.psql-version }}" | |
- name: Install needed packages | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y imagemagick libsodium-dev libpq-dev | |
- name: Build app | |
id: app-build | |
run: ruby bin/setup | |
- name: Build & test api | |
id: api-test | |
run: rails swag:run | |
- name: Upload artifact | |
id: upload-artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: swagger-documentation | |
path: /home/runner/work/catima/catima/swagger/v3/swagger.yaml |