Repository navigation
Enhance CI workflow and improve StrategyPerformance component #29
This file contains hidden or 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: Continuous Integration | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - master | |
| pull_request: | |
| branches: | |
| - main | |
| - master | |
| jobs: | |
| ci: | |
| name: Docker Compose CI | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Create CI environment file | |
| run: | | |
| cp .env.example .env | |
| - name: Build Docker Compose services | |
| run: | | |
| docker compose -f docker-compose.yml build backend frontend | |
| - name: Run backend tests in Docker Compose | |
| run: | | |
| docker compose -f docker-compose.yml run --rm \ | |
| -v ${{ github.workspace }}:/app \ | |
| -w /app backend \ | |
| pytest tests/ | |
| - name: Run frontend tests in Docker Compose | |
| run: | | |
| docker compose -f docker-compose.yml run --rm \ | |
| -v ${{ github.workspace }}:/app \ | |
| -w /app/frontend frontend \ | |
| npm test -- --runInBand | |
| - name: Build frontend in Docker Compose | |
| run: | | |
| docker compose -f docker-compose.yml run --rm \ | |
| -v ${{ github.workspace }}:/app \ | |
| -w /app/frontend frontend \ | |
| npm run build |