feat: Containeriza os testes de backend FOSS no GitHub Actions com Ruby 3.4.4 e ajusta a configuração de acesso aos serviços.
This commit is contained in:
parent
055b303985
commit
a5aab8baca
15
.github/workflows/run_foss_spec.yml
vendored
15
.github/workflows/run_foss_spec.yml
vendored
@ -24,6 +24,7 @@ jobs:
|
|||||||
# Backend tests with parallelization
|
# Backend tests with parallelization
|
||||||
backend-tests:
|
backend-tests:
|
||||||
runs-on: [self-hosted, oracle-arm]
|
runs-on: [self-hosted, oracle-arm]
|
||||||
|
container: ruby:3.4.4
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
max-parallel: 8
|
max-parallel: 8
|
||||||
@ -39,8 +40,6 @@ jobs:
|
|||||||
POSTGRES_PASSWORD: ''
|
POSTGRES_PASSWORD: ''
|
||||||
POSTGRES_DB: postgres
|
POSTGRES_DB: postgres
|
||||||
POSTGRES_HOST_AUTH_METHOD: trust
|
POSTGRES_HOST_AUTH_METHOD: trust
|
||||||
ports:
|
|
||||||
- 5432:5432
|
|
||||||
options: >-
|
options: >-
|
||||||
--mount type=tmpfs,destination=/var/lib/postgresql/data
|
--mount type=tmpfs,destination=/var/lib/postgresql/data
|
||||||
--health-cmd pg_isready
|
--health-cmd pg_isready
|
||||||
@ -49,10 +48,13 @@ jobs:
|
|||||||
--health-retries 5
|
--health-retries 5
|
||||||
redis:
|
redis:
|
||||||
image: redis:alpine
|
image: redis:alpine
|
||||||
ports:
|
|
||||||
- 6379:6379
|
|
||||||
options: --entrypoint redis-server
|
options: --entrypoint redis-server
|
||||||
|
|
||||||
|
env:
|
||||||
|
POSTGRES_HOST: postgres
|
||||||
|
REDIS_URL: redis://redis:6379
|
||||||
|
RAILS_ENV: test
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- uses: pnpm/action-setup@v4
|
- uses: pnpm/action-setup@v4
|
||||||
@ -79,8 +81,9 @@ jobs:
|
|||||||
|
|
||||||
- name: Set up database
|
- name: Set up database
|
||||||
run: |
|
run: |
|
||||||
psql -U postgres -h localhost -c "CREATE ROLE root LOGIN SUPERUSER;"
|
apt-get update && apt-get install -y postgresql-client
|
||||||
psql -U postgres -h localhost -c "CREATE DATABASE chatwoot_dev OWNER root;"
|
psql -U postgres -h postgres -c "CREATE ROLE root LOGIN SUPERUSER;"
|
||||||
|
psql -U postgres -h postgres -c "CREATE DATABASE chatwoot_dev OWNER root;"
|
||||||
env:
|
env:
|
||||||
PGPASSWORD: ''
|
PGPASSWORD: ''
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user