Skip to content

Commit

Permalink
fix: new one old prev
Browse files Browse the repository at this point in the history
  • Loading branch information
olehbairak committed Jan 24, 2024
1 parent ab33a92 commit 2290d35
Showing 1 changed file with 19 additions and 56 deletions.
75 changes: 19 additions & 56 deletions .github/workflows/integration-tests-api.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,49 +2,6 @@ name: Integration test - API
on: pull_request

jobs:
build_and_cache:
runs-on: ubuntu-latest

steps:
- name: Log in to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USER }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Checkout Repository
uses: actions/checkout@v2

# - name: Build Docker Image
# run: docker build -t block-explorer_app:latest .

- name: Cache Docker Image
uses: actions/cache@v2
with:
path: |
/var/lib/docker
key: docker-image-${{ runner.os }}-${{ hashFiles('**/*.dockerfile') }}
if: success()

use_cached_docker_image:
runs-on: ubuntu-latest

steps:
- name: Checkout Repository
uses: actions/checkout@v2

- name: Restore Cached Docker Image
uses: actions/cache@v2
with:
path: |
/var/lib/docker
key: docker-image-${{ runner.os }}-${{ hashFiles('**/*.dockerfile') }}

#- name: Use Docker Image in Another Job
# run: |
# # Your commands to use the Docker image


runTests:
timeout-minutes: 30
runs-on: ubuntu-latest
Expand Down Expand Up @@ -72,15 +29,15 @@ jobs:
with:
fetch-depth: 0

# - name: Cache Docker images
# id: cache-docker-images
# uses: actions/cache@v3
# with:
# path: |
# ~/.docker
# key: ${{ runner.os }}-docker-${{ hashFiles('**/docker-compose.yaml') }}
# restore-keys: |
# ${{ runner.os }}-docker-
- name: Cache Docker images
id: cache-docker-images
uses: actions/cache@v3
with:
path: |
/var/lib/docker/
key: ${{ runner.os }}-docker-${{ hashFiles('**/docker-compose.yaml') }}
restore-keys: |
${{ runner.os }}-docker-
- name: Setup Node.js
uses: actions/setup-node@v3
Expand All @@ -93,9 +50,15 @@ jobs:
npm ci --no-audit
npx playwright install --with-deps chromium
#- name: Start docker containers
# run: |
# docker-compose -f "docker-compose.yaml" up -d --build
- name: Log in to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USER }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Start docker containers
run: |
docker-compose -f "docker-compose.yaml" up -d --build
- name: List running containers
run: docker ps
Expand All @@ -108,4 +71,4 @@ jobs:
- name: Stop containers
if: always()
run: |
docker-compose -f "docker-compose.yaml" down
docker-compose -f "docker-compose.yaml" down

0 comments on commit 2290d35

Please sign in to comment.