docs(readme): add common dependencies in usage #700
Workflow file for this run
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: Pong Server Tests | |
on: | |
push: | |
branches: | |
- main | |
- dev | |
pull_request: | |
branches: | |
- main | |
- dev | |
jobs: | |
build: | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.12' | |
- name: Generate .env file | |
run: | | |
pip install cryptography python-dotenv | |
python common/src/generate_env.py | |
- name: Copy shared files | |
run: | | |
cp -r pong_server/src/shared_code pong_server/src/game_creator/ | |
cp -r pong_server/src/shared_code pong_server/src/game_server/ | |
cp -r common pong_server/src/game_creator/ | |
cp -r common pong_server/src/game_server/ | |
- name: Install dependencies | |
run: | | |
pip3 install --upgrade pip | |
pip3 install flake8 | |
pip3 install isort | |
pip3 install -r pong_server/docker/requirements.txt | |
pip3 install -r common/docker/requirements.txt | |
- name: Generate ssl certificates | |
run: | | |
make generate_ssl_certificate | |
sudo chmod 777 ssl/certs/* | |
- name: Generate .env | |
run: | | |
python3 common/src/generate_env.py | |
- name: Run unit tests game creator | |
run: | | |
`sed 's/^/export /' common/src/.env` | |
export PONG_GAME_SERVERS_MIN_PORT=42200 | |
export PONG_GAME_SERVERS_MAX_PORT=42210 | |
export GAME_SERVER_PATH=`pwd`/pong_server/src/game_server/ | |
export PATH_TO_SSL_CERTS=`pwd`/ssl/certs/ | |
export DEBUG=True | |
cd pong_server/src/game_creator/ | |
python3 manage.py test | |
- name: Run PEP8 check | |
working-directory: pong_server/ | |
run: | | |
flake8 . --max-line-length=95 --exclude=common | |
- name: Check imports in game_creator | |
working-directory: pong_server/src/game_creator/ | |
run: | | |
isort . --check-only | |
- name: Check imports in game_server | |
working-directory: pong_server/src/game_server/ | |
run: | | |
isort . --check-only | |
- name: Check imports in shared_code | |
working-directory: pong_server/src/shared_code/ | |
run: | | |
isort . --check-only | |
- name: Check imports in test | |
working-directory: pong_server/test/ | |
run: | | |
isort . --check-only |