Skip to content

Commit

Permalink
skip image cache for marginal 15s gain
Browse files Browse the repository at this point in the history
  • Loading branch information
aakash-rajur committed Oct 8, 2023
1 parent afbd6ea commit 4d3e9eb
Showing 1 changed file with 26 additions and 26 deletions.
52 changes: 26 additions & 26 deletions .github/workflows/test-job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,32 +44,32 @@ jobs:
- id: install-dependencies
name: install dependencies
run: go mod download
- id: image-cache-setup
name: service container cache setup
uses: actions/cache@v3
with:
path: /tmp/image-cache
key: test-${{ runner.os }}-image-cache
- id: image-cache
name: service container cache
if: steps.image-cache-setup.outputs.cache-hit != 'true'
run: |
docker pull ${{ env.POSTGRESQL_IMAGE }}:${{ env.POSTGRESQL_VERSION }};
docker pull ${{ env.MYSQL_IMAGE }}:${{ env.MYSQL_VERSION }};
mkdir -p /tmp/image-cache;
docker save ${{ env.POSTGRESQL_IMAGE }}:${{ env.POSTGRESQL_VERSION }} > /tmp/image-cache/postgresql.tar;
docker save ${{ env.MYSQL_IMAGE }}:${{ env.MYSQL_VERSION }} > /tmp/image-cache/mysql.tar;
- id: image-cache-restore
name: service container cache restore
if: steps.image-cache-setup.outputs.cache-hit == 'true'
run: |
docker load -i /tmp/image-cache/postgresql.tar;
docker load -i /tmp/image-cache/mysql.tar;
# - id: image-cache-setup
# name: service container cache setup
# uses: actions/cache@v3
# with:
# path: /tmp/image-cache
# key: test-${{ runner.os }}-image-cache
# - id: image-cache
# name: service container cache
# if: steps.image-cache-setup.outputs.cache-hit != 'true'
# run: |
# docker pull ${{ env.POSTGRESQL_IMAGE }}:${{ env.POSTGRESQL_VERSION }};
#
# docker pull ${{ env.MYSQL_IMAGE }}:${{ env.MYSQL_VERSION }};
#
# mkdir -p /tmp/image-cache;
#
# docker save ${{ env.POSTGRESQL_IMAGE }}:${{ env.POSTGRESQL_VERSION }} > /tmp/image-cache/postgresql.tar;
#
# docker save ${{ env.MYSQL_IMAGE }}:${{ env.MYSQL_VERSION }} > /tmp/image-cache/mysql.tar;
# - id: image-cache-restore
# name: service container cache restore
# if: steps.image-cache-setup.outputs.cache-hit == 'true'
# run: |
# docker load -i /tmp/image-cache/postgresql.tar;
#
# docker load -i /tmp/image-cache/mysql.tar;
- id: boot-service-containers
name: boot service containers
run: |
Expand Down

0 comments on commit 4d3e9eb

Please sign in to comment.