Skip to content

Commit

Permalink
fix: clean
Browse files Browse the repository at this point in the history
  • Loading branch information
olehbairak committed Jan 24, 2024
1 parent 70bca70 commit ae4c49e
Showing 1 changed file with 3 additions and 20 deletions.
23 changes: 3 additions & 20 deletions .github/workflows/integration-tests-api.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,40 +39,23 @@ jobs:
run: |
npm ci --no-audit
npx playwright install --with-deps chromium
- name: Log in to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USER }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Print Working Directory
run: |
pwd
- name: Check Docker cache and use if available
- name: Start docker containers
run: |
SERVICES=("block-explorer_worker" "postgres" "matterlabs_local_node") # List of services
for SERVICE in "${SERVICES[@]}"; do
CACHE_IMAGE=$(docker images -q "$SERVICE:latest")
if [ -n "$CACHE_IMAGE" ]; then
echo "Using cached image for $SERVICE: $CACHE_IMAGE"
docker-compose -f "docker-compose.yaml" up -d --build $SERVICE
else
echo "No cached image found for $SERVICE. Building from scratch."
docker-compose -f "docker-compose.yaml" up -d --build $SERVICE
fi
done
docker-compose -f "docker-compose.yaml" up -d --build
- name: List running containers
run: docker ps

- name: API tests run (parallel)
run: |
cd packages/integration-tests
npx jest --verbose --testPathPattern=${{ matrix.test-pattern }}
- name: Stop containers
if: always()
run: |
docker-compose -f "docker-compose.yaml" down
docker-compose -f "docker-compose.yaml" down

0 comments on commit ae4c49e

Please sign in to comment.