Skip to content

Merge pull request #248 from destag/229-do-not-change-campaign-config… #1

Merge pull request #248 from destag/229-do-not-change-campaign-config…

Merge pull request #248 from destag/229-do-not-change-campaign-config… #1

Workflow file for this run

name: Proca Server CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
build:
name: Build and test
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Set up Elixir
uses: erlef/setup-beam@v1
with:
elixir-version: "1.12.0" # Define the elixir version [required]
otp-version: "23.3.1" # Define the OTP version [required]
- name: Install and setup PostgreSQL with PostgreSQL extensions and unprivileged user
# You may pin to the exact commit or the version.
# uses: Daniel-Marynicz/postgresql-action@0dcc196f0ddffbdf095921877c6577132ab35756
uses: Daniel-Marynicz/[email protected]
with:
# Docker postgres image tag for available image tags please see https://hub.docker.com/_/postgres
postgres_image_tag: 12.7 # optional, default is latest
postgres_user: proca
postgres_password: proca
# POSTGRES_USER - create the user with the superuser power
#postgres_user: # optional, default is postgres
# POSTGRES_DB - postgres database
#postgres_db: # optional, default is postgres
# POSTGRES_PASSWORD - superuser password
#postgres_password: # optional
# POSTGRES_EXTENSIONS - List of postgres extensions separated by space to install in template1 database
postgres_extensions: citext # optional
# APP_USER - unprivileged postgres user
#app_user: proca # optional, default is app
# APP_PASSWORD_USER - password for unprivileged postgres user
#app_user_password: proca # optional, default is app
# APP_DB - database or list of databases separated by space for unprivileged postgres user
#app_db: proca_test # optional, default is app
# EXPOSED_POSTGRES_PORT - exposed postgres port
#exposed_postgres_port: # optional, default is 5432
- name: Install RabbitMQ
# You may pin to the exact commit or the version.
# uses: mer-team/rabbitmq-mng-action@8efa214ee17181617aada9d7aab74a701a6a49bb
uses: mer-team/[email protected]
with:
RABBITMQ_USER: "" ## XXX GH action is broken and we need to unset these vars
RABBITMQ_PASS: "" ## as they are deprecated
RABBITMQ_PORT: 5672
RABBITMQ_MNG_PORT: 15672
RABBITMQ_TAG: 3-management-alpine # optional, default is 3-alpine
- name: Restore dependencies cache
uses: actions/cache@v2
with:
path: deps
key: ${{ runner.os }}-mix-${{ hashFiles('**/mix.lock') }}
restore-keys: ${{ runner.os }}-mix-
- name: Setup RabbitMQ
run: ./utils/configure-rabbitmq-develop.sh -D
working-directory: proca
- name: Install dependencies
run: mix deps.get
working-directory: proca
- name: Setup app db (migrate)
run: mix ecto.setup
env:
MIX_ENV: test
working-directory: proca
- name: Run tests
run: mix test
working-directory: proca