Add BattleEngine in Rust for better memory efficiency with large battles #937
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: Docker Compose Build and Test | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
jobs: | |
test-docker: | |
runs-on: ubuntu-latest | |
services: | |
docker: | |
image: docker:26.0.0 | |
options: --privileged | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Modify Dockerfile to disable USER www (which is not supported by GitHub Actions, as it runs as root) | |
run: | | |
sed -i '/USER www/s/^/#/' ./Dockerfile | |
- name: Set Permissions | |
run: sudo chmod -R 777 /var/www | |
- name: Copy .env | |
run: sudo cp .env.example .env | |
- name: Set up Docker Compose | |
run: | | |
# Build the images and start the services | |
docker compose -f docker-compose.yml up -d | |
- name: Wait 10 seconds | |
run: sleep 10 | |
- name: Wait for application to be ready up to 60 seconds | |
run: | | |
# Wait for the application to be ready (max 60 seconds) | |
timeout 60 bash -c 'until docker compose exec -T ogamex-app php artisan migrate:status > /dev/null 2>&1; do echo "Waiting for application to be ready..." && sleep 2; done' | |
- name: Run Tests | |
run: docker compose exec -T ogamex-app php artisan test | |
- name: Run custom Race Condition Tests | |
run: | | |
docker compose exec -T ogamex-app php artisan test:race-condition-unitqueue | |
docker compose exec -T ogamex-app php artisan test:race-condition-game-mission |