Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]:[github Actions] cache cannot be disabled even the parameter is set to false #3363

Closed
yanCode opened this issue Nov 14, 2024 · 1 comment
Labels
bug Something isn't working ci

Comments

@yanCode
Copy link
Contributor

yanCode commented Nov 14, 2024

According to the settings in :
https://github.com/coral-xyz/anchor/blob/master/.github/workflows/tests.yaml

jobs:
  tests:
    name: Reusable
    uses: ./.github/workflows/reusable-tests.yaml
    with:
      cache: true
      solana_cli_version: 2.1.0
      node_version: 20.16.0
      cargo_profile: debug
      anchor_binary_name: anchor-binary
    

If I change cache from true to false above, Cache in Github Actions should be disabled. but this is not working, the reason is:

CACHE: inputs.cache

which should be CACHE: ${{ inputs.cache }}, othewise the value of env.CACHE will be a value of hardcoded inputs.cache, which always makes if: ${{ env.CACHE != 'false' }}) to be truthy to use the cache.

This is issue doesn't break current action workflow is because by default reusable-tests.yaml is called with cache: true. I detected it while I forked this project and trying to run the tests without cache.

i will provide a PR shortly.

yanCode added a commit to yanCode/anchor that referenced this issue Nov 14, 2024
@acheroncrypto acheroncrypto added bug Something isn't working ci labels Nov 14, 2024
@acheroncrypto
Copy link
Collaborator

Fixed by #3364

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working ci
Projects
None yet
Development

No branches or pull requests

2 participants