Is there any way to enable file caching with Github Actions?

  • ALM used: GitHub
  • CI system: Github Actions
  • PHP
  • CMD:
     -  name: SonarCloud Scan
          uses: SonarSource/sonarcloud-github-action@master
          env:
                GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
                SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

When running the scan everything goes well but it takes quite some time (4-5 min). It seems to not leveraging any cache. This is what I’m referring to:

INFO: The PHP analyzer was able to leverage cached data from previous analyses for 0 out of 2934 files. These files were not parsed.

How can we cache these files and only scan the ones changed? Haven’t found anything regarding this particular issue. Has anyone come across this before?

Thank you for your time!

Hi,

The caching happens server-side, nothing for you do to. And it’s only used when a PR is being analyzed. Was that the case here?

 
Ann