Skip to content

ci(test): overwrite download step #2

ci(test): overwrite download step

ci(test): overwrite download step #2

name: Test
on:
push:
branches:
- main
env:
GO_VERSION: '1.22'
jobs:
integration:
name: Integration Test
runs-on: ubuntu-latest
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v4.1.6
- name: Restore test images from cache
uses: actions/cache@v4
id: restore-test-images
with:
path: integration/testdata/fixtures/images
key: "2024-09-10" # trivy-test-images last update date
- name: Download test images if cache is missing
if: steps.restore-test-images.outputs.cache-hit != 'true'
run: echo "123" > integration/testdata/fixtures/images/test-image2.txt
- name: Save test images into cache if cache is missing
if: steps.restore-test-images.outputs.cache-hit != 'true'
uses: actions/cache@v4
with:
path: integration/testdata/fixtures/images
key: "2024-09-10" # trivy-test-images last update date