Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use docker compose instead of action services in ci #2122

Merged
merged 1 commit into from
Dec 21, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 10 additions & 39 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -237,27 +237,6 @@ jobs:
otp: 25
- elixir: 1.13.4
otp: 22
services:
postgres:
image: postgres
env:
POSTGRES_PASSWORD: postgres
POSTGRES_DB: trento_test
ports:
- 5433:5432
# Set health checks to wait until postgres has started
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
rabbitmq:
image: rabbitmq
env:
RABBITMQ_DEFAULT_USER: trento
RABBITMQ_DEFAULT_PASS: trento
ports:
- 5673:5672
steps:
- name: Cancel Previous Runs
uses: styfle/[email protected]
Expand All @@ -283,6 +262,11 @@ jobs:
key: ${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}-${{ hashFiles('mix.lock') }}
- name: Compile
run: mix compile --warnings-as-errors
- name: "Docker compose dependencies"
uses: isbang/[email protected]
with:
compose-file: "./docker-compose.yaml"
down-flags: "--volumes"
- name: Run test
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down Expand Up @@ -374,24 +358,6 @@ jobs:
runs-on: ubuntu-20.04
env:
MIX_ENV: dev
services:
postgres:
image: postgres
env:
POSTGRES_PASSWORD: postgres
POSTGRES_DB: trento_dev
ports:
- 5433:5432
# Set health checks to wait until postgres has started
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
grafana:
image: grafana/grafana:8.3.5
ports:
- 3000:3000
steps:
- name: Cancel Previous Runs
uses: styfle/[email protected]
Expand Down Expand Up @@ -437,6 +403,11 @@ jobs:
key: ${{ runner.os }}-${{ env.NODE_VERSION }}-${{ hashFiles('test/e2e/package-lock.json') }}
- name: Check Eslint and JS Code Format
run: cd test/e2e && npm run lint && npm run format:check
- name: "Docker compose dependencies"
uses: isbang/[email protected]
with:
compose-file: "./docker-compose.yaml"
down-flags: "--volumes"
- name: Mix setup
run: mix setup
- name: Run trento detached
Expand Down