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

Merged
merged 2 commits into from
Jun 5, 2024

Conversation

stasadev
Copy link
Contributor

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.

@natemoo-re natemoo-re merged commit f42778c into withastro:main Jun 5, 2024
@stasadev stasadev deleted the fix-check-for-lockfiles-depth branch June 5, 2024 18:26
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

2 participants