Imp node clustering #61
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: Docker Compose Test | |
| on: | |
| pull_request: | |
| branches: | |
| - main | |
| workflow_dispatch: | |
| jobs: | |
| run_tests: | |
| runs-on: self-hosted | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Build the SAMA resources | |
| env: | |
| NODE_ENV: testing | |
| run: docker compose -f docker-compose-full.yml up -d --build | |
| - name: Run migrations | |
| run: docker compose exec sama-server sh -c "MONGODB_URL=mongodb://172.25.0.4/samatests npm run migrate-mongo-up" | |
| - name: Run tests single node | |
| run: docker compose exec sama-server sh -c "MONGODB_URL=mongodb://172.25.0.4/samatests npm run test" | |
| - name: Run tests cluster nodes | |
| run: docker compose exec sama-server sh -c "MONGODB_URL=mongodb://172.25.0.4/samatests npm run test:cluster" | |
| - name: Stop the SAMA resources | |
| if: always() | |
| run: docker compose -f docker-compose-full.yml down -v --rmi all |