Skip to content

[fix]: #128 add async link #216

[fix]: #128 add async link

[fix]: #128 add async link #216

Workflow file for this run

name: Lint And Test
on:
pull_request:
branches: [ "main" ]
jobs:
run-lint:
runs-on: ubuntu-latest
services:
db:
image: postgres:latest
ports:
- 5432:5432
env:
POSTGRES_DB: pongchat
POSTGRES_USER: user
POSTGRES_PASSWORD: password
options: >-
--health-cmd "pg_isready -U user"
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Docker Compose
run: |
docker compose up -d
- name: Wait for PostgreSQL
run: |
docker compose exec -T db bash -c "until pg_isready -U user; \
do sleep 1; done"
- name: Make env
run: |
cp -a .env.sample .env
- name: Create media directory
run: |
mkdir -p ./PongChat/media/profile_images
chmod -R 777 ./PongChat/media
- name: Run Lint and Tests
run: |
docker compose exec -T web-dev make lint
docker compose exec -T web-dev python PongChat/manage.py migrate
docker compose exec -T web-dev make test
- name: Tear Down
if: always()
run: docker compose down