Skip to content

Fix/ssl cert on prod #1743

Fix/ssl cert on prod

Fix/ssl cert on prod #1743

Workflow file for this run

name: RubyCI
on:
push:
branches:
- main
pull_request:
branches:
- main
types: [opened, synchronize, reopened, ready_for_review]
env:
RAILS_MASTER_KEY: ${{ secrets.RAILS_MASTER_KEY }}
DATABASE_URL: postgres://postgres:postgres@localhost:5432/test
REDIS_URL: redis://localhost:6379/0
jobs:
rubocop:
name: Rubocop
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
bundler-cache: true
- name: Run Rubocop
run: |
bundle exec rubocop
security:
name: Security
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Setup Ruby and install gems
uses: ruby/setup-ruby@v1
with:
bundler-cache: true
- name: Run brakeman
run: |
bundle exec brakeman -w3
- name: Run bundler-audit
run: |
bundle exec bundle-audit check --update
tests:
name: Tests
env:
RAILS_ENV: test
BUNDLE_GEMS__CONTRIBSYS__COM: ${{ secrets.BUNDLE_GEMS__CONTRIBSYS__COM }}
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
services:
postgres:
image: postgis/postgis:10-2.5
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: test
ports:
- 5432:5432
# needed because the postgres container does not provide a healthcheck
# tmpfs makes DB faster by using RAM
options: >-
--mount type=tmpfs,destination=/var/lib/postgresql/data
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
redis:
image: redis
ports:
- 6379:6379
options: --entrypoint redis-server
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v3
with:
node-version: 20.17.0
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
## runs 'bundle install' and caches installed gems automatically
bundler-cache: true
env:
BUNDLE_GEMS__CONTRIBSYS__COM: ${{ secrets.BUNDLE_GEMS__CONTRIBSYS__COM }}
- name: Create DB
run: |
bin/rails db:prepare
- name: Install Node packages
run: |
bin/yarn install --ignore-engines
- name: Run tests
run: |
bundle exec rspec --fail-fast