Update postgres Docker tag to v17 #6518
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: Ruby | |
on: | |
pull_request: | |
branches: [master] | |
push: | |
branches: [master,staging] | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
env: | |
TEST_DB_HOST: localhost | |
TEST_DB_USER: postgres | |
TEST_DB_PASSWORD: postgres | |
TEST_DB_NAME: postgres | |
RAILS_ENV: test | |
services: | |
postgres: | |
image: postgres:17 | |
env: | |
POSTGRES_PASSWORD: postgres | |
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 | |
ports: | |
- 5432:5432 | |
redis: | |
image: redis | |
options: --health-cmd "redis-cli ping" --health-interval 10s --health-timeout 5s --health-retries 5 | |
ports: | |
- 6379:6379 | |
steps: | |
- name: Check out files | |
uses: actions/checkout@v4 | |
- name: Set up Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
bundler-cache: true | |
env: | |
BUNDLE_GEMS__CONTRIBSYS__COM: ${{ secrets.BUNDLE_GEMS__CONTRIBSYS__COM }} | |
- name: Set up DB | |
run: | | |
bundle exec rails db:create | |
bundle exec rails db:schema:load | |
- name: Dummy service credential | |
run: cp spec/fixtures/service_account_cred.json.actions config/secure/service_account_cred.json | |
- name: RSpec tests | |
run: bundle exec rspec --color | |
- name: Codecov upload | |
uses: codecov/codecov-action@v4 | |
with: | |
fail_ci_if_error: true | |
token: ${{ secrets.CODECOV_TOKEN }} | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out files | |
uses: actions/checkout@v4 | |
- name: Set up Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
bundler-cache: true | |
env: | |
BUNDLE_GEMS__CONTRIBSYS__COM: ${{ secrets.BUNDLE_GEMS__CONTRIBSYS__COM }} | |
- name: Bundle audit | |
run: bundle exec bundle audit check --update ${{ vars.CVE_IGNORES && format('--ignore {0}', vars.CVE_IGNORES) }} | |
- name: Brakeman | |
run: bundle exec brakeman -A -q --ensure-latest --no-pager | |
- name: StandardRB | |
run: bundle exec standardrb --format simple |