Skip to content

Fix dump memory ussage #306

Fix dump memory ussage

Fix dump memory ussage #306

Workflow file for this run

name: Test Ruby
on:
push:
branches: [ master, dev ]
pull_request:
branches: [ master, dev ]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
runs-on: ubuntu-latest
services:
postgres:
image: postgis/postgis
env:
POSTGRES_DB: api
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
ports:
- 5432:5432
steps:
- uses: awalsh128/cache-apt-pkgs-action@latest
with:
packages: postgresql-client libgeos-dev libproj-dev
- uses: actions/checkout@v3
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.0'
bundler-cache: true
cache-version: 1
- name: Setup test database
env:
RAILS_ENV: test
DATABASE_URL: postgres://postgres:postgres@localhost:5432/api
run: bundle exec rails db:setup
- name: Run rubocop
run: bundle exec rubocop --parallel -c .rubocop.yml
- name: Run typecheck
run: |
bundle exec tapioca init && \
bundle exec rake rails_rbi:routes && \
bundle exec srb rbi suggest-typed && \
bundle exec srb typecheck -q
# bundle exec tapioca dsl && \
# - name: Run security checks
# run: |
# bin/bundler-audit --update
# bin/brakeman -q -w2
- name: Run tests
run: bundle exec rake test
env:
DATABASE_URL: postgres://postgres:postgres@localhost:5432/api
- name: Run tests SQL
run: bundle exec rake test:sql
env:
DATABASE_URL: postgres://postgres:postgres@localhost:5432/api
docker:
runs-on: ubuntu-latest
needs: [test]
if: github.ref == 'refs/heads/dev'
permissions:
contents: read
packages: write
id-token: write
steps:
- name: Docker Build and Push
uses: cartoway/docker-compose-build-push-action@main
with:
registry_password: ${{ secrets.GITHUB_TOKEN }}