Skip to content

refactor: explicit type declaration #18

refactor: explicit type declaration

refactor: explicit type declaration #18

Workflow file for this run

name: ci
on: push
jobs:
test:
environment: development
runs-on: ubuntu-22.04
container: tyknkd/spark:3.3.2-scala2.13-jdk17-gradle8.7-jammy
env:
POSTGRES_PASSWORD: ${{ secrets.POSTGRES_PASSWORD }}
NEWS_API_KEY: ${{ secrets.NEWS_API_KEY }}
POSTGRES_USER: newsanalyzer
POSTGRES_DB: collector_db
POSTGRES_HOST: db
OS_ENV: container
services:
db:
image: postgres:16.2
env:
POSTGRES_PASSWORD: ${{ secrets.POSTGRES_PASSWORD }}
POSTGRES_USER: ${{ env.POSTGRES_USER }}
POSTGRES_DB: ${{ env.POSTGRES_DB }}
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
mq:
image: rabbitmq:3.13-management
ports:
- 5672:5672
- 15692:15692
options: >-
--health-cmd "rabbitmq-diagnostics check_port_connectivity"
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- name: Install PostgreSQL client
run: |
apt update
apt install -y postgresql-client
- name: Checkout repository
uses: actions/checkout@v4
- name: Initialize databases
shell: bash
run: |
source .env
chmod +x ./docker-databases/docker-entrypoint-initdb.d/init-additional-db.sh
./docker-databases/docker-entrypoint-initdb.d/init-additional-db.sh
- name: Run tests
shell: bash
run: |
source .env
gradle test