Skip to content

Add Depth Anything V2 as a library #1470

Add Depth Anything V2 as a library

Add Depth Anything V2 as a library #1470

Workflow file for this run

name: Lint
on:
pull_request:
push:
branches:
- main
jobs:
lint:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v3
with:
# Could use something like rmacklin/fetch-through-merge-base@v0 instead when the repo gets bigger
fetch-depth: 0
- name: "Extracting the merge base into 'SINCE'"
id: since
run: |
if [ -z "${{ github.event.pull_request.head.ref }}" ]
then
echo "SINCE=${{ github.sha }}^1" >> $GITHUB_OUTPUT
else
echo "SINCE=$(git merge-base origin/${{ github.event.pull_request.base.ref }} ${{ github.sha }})" >> $GITHUB_OUTPUT
fi
- run: corepack enable
- uses: actions/setup-node@v3
with:
node-version: "20"
cache: "pnpm"
cache-dependency-path: "**/pnpm-lock.yaml"
- run: |
pnpm install --frozen-lockfile --filter .
pnpm install --frozen-lockfile --filter ...[${{ steps.since.outputs.SINCE }}]...
pnpm --filter ...[${{ steps.since.outputs.SINCE }}]... build
- name: "Checking lint errors"
run: |
pnpm --filter ...[${{ steps.since.outputs.SINCE }}] lint:check
- name: "Checking format errors"
run: |
# Could also use pnpm --filter [${{ steps.since.outputs.SINCE }}] format:check
# But this way we can see the diff
pnpm --filter [${{ steps.since.outputs.SINCE }}] format
git diff | head -n 100
git diff --name-only --exit-code
- name: Check types
run: pnpm --filter ...[${{ steps.since.outputs.SINCE }}] check