Update techstack.md #85
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: Run Tests | |
on: [push] | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
env: | |
ENVIRONMENT: development | |
POSTGRES_USER: ex_back_user | |
POSTGRES_PASSWORD: ex_back_password | |
PG_DB: ex_back_db | |
PG_HOST: db | |
PG_PORT: 5432 | |
TEST_DB: ex_back_test_db | |
RABBITMQ_HOST: rabbitmq | |
RABBITMQ_PORT: 5672 | |
RABBITMQ_DEFAULT_USER: user | |
RABBITMQ_DEFAULT_PASS: pass | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Create .env | |
run: touch .env | |
- name: Write to .env | |
run: | | |
echo "POSTGRES_USER=${{ env.POSTGRES_USER }}" >> .env | |
echo "POSTGRES_PASSWORD=${{ env.POSTGRES_PASSWORD }}" >> .env | |
echo "PG_DB=${{ env.PG_DB }}" >> .env | |
echo "PG_HOST=${{ env.PG_HOST }}" >> .env | |
echo "PG_PORT=${{ env.PG_PORT }}" >> .env | |
echo "TEST_DB=${{ env.TEST_DB }}" >> .env | |
echo "ENVIRONMENT=${{ env.ENVIRONMENT }}" >> .env | |
echo "RABBITMQ_HOST=${{ env.RABBITMQ_HOST }}" >> .env | |
echo "RABBITMQ_PORT=${{ env.RABBITMQ_PORT }}" >> .env | |
echo "RABBITMQ_DEFAULT_USER=${{ env.RABBITMQ_DEFAULT_USER }}" >> .env | |
echo "RABBITMQ_DEFAULT_PASS=${{ env.RABBITMQ_DEFAULT_PASS }}" >> .env | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v1 | |
- name: Cache Docker layers | |
uses: actions/cache@v3 | |
with: | |
path: /tmp/.buildx-cache | |
key: ${{ runner.os }}-buildx-${{ github.sha }} | |
restore-keys: | | |
${{ runner.os }}-buildx- | |
- name: Run tests | |
run: scripts/run test |