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

Fix check for lockfiles depth #52

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

stasadev
Copy link

The Issue

At DDEV we run linter before executing this action:

https://github.com/ddev/ddev.com/blob/7a849588830da831a94f356877abee6d08a458a9/.github/workflows/test.yml

jobs:
  build:
    timeout-minutes: 15
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - uses: actions/setup-node@v3
        with:
          node-version: 20
      - name: Install dependencies
        run: npm ci
      - name: Lint
        run: npm run textlint
      - name: Install, build, and upload your site output
        uses: withastro/action@v2

And your action use find to check for pnpm-lock.yaml, yarn.lock, package-lock.json and bun.lockb without a specific depth, which resulted in:

find "." -name "yarn.lock"
./node_modules/uri-js/yarn.lock

And our tests failed with (we use npm):

Warning: No existing directories found containing cache-dependency-path="./yarn.lock"

How This PR Solves The Issue

Use -maxdepth 1 as it makes no sense to search all subdirectories for lockfiles.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant