Buckets:
| name: Test | |
| on: | |
| pull_request: | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| node: | |
| 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 | |
| env: | |
| PR_REF: ${{ github.event.pull_request.head.ref }} | |
| BASE_REF: origin/${{ github.event.pull_request.base.ref }} | |
| run: | | |
| if [ -z $PR_REF ] | |
| then | |
| echo "SINCE=${{ github.sha }}^1" >> $GITHUB_OUTPUT | |
| else | |
| echo "SINCE=$(git merge-base $BASE_REF ${{ github.sha }})" >> $GITHUB_OUTPUT | |
| fi | |
| - run: npm install -g corepack@latest && 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: Test | |
| run: pnpm --filter ...[${{ steps.since.outputs.SINCE }}] test | |
| env: | |
| HF_TOKEN: ${{ secrets.HF_TOKEN }} | |
| browser: | |
| 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 | |
| env: | |
| PR_REF: ${{ github.event.pull_request.head.ref }} | |
| run: | | |
| if [ -z $PR_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: google-chrome --version | |
| - run: npm install -g corepack@latest && corepack enable | |
| - uses: actions/setup-node@v3 | |
| with: | |
| node-version: "22" | |
| 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: Test in browser | |
| run: pnpm --filter ...[${{ steps.since.outputs.SINCE }}] test:browser | |
| env: | |
| HF_TOKEN: ${{ secrets.HF_TOKEN }} | |
| e2e: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - run: npm install -g corepack@latest && corepack enable | |
| - uses: actions/setup-node@v3 | |
| with: | |
| node-version: "20" | |
| cache: "pnpm" | |
| cache-dependency-path: "**/pnpm-lock.yaml" | |
| - name: E2E - start mock npm registry | |
| run: | | |
| npm i -g verdaccio verdaccio-memory verdaccio-auth-memory | |
| echo >> .npmrc | |
| echo "//localhost:4874/:_authToken=1FlYaQkIdHsIztXCHmqu9g==" >> .npmrc | |
| npx verdaccio --listen 4874 --config e2e/mock-registry-config.yaml & | |
| - name: E2E test - publish packages to mock repo | |
| working-directory: e2e | |
| run: | | |
| sleep 3 | |
| pnpm i --filter root --filter inference... --filter hub... --filter tasks-gen --frozen-lockfile | |
| pnpm --filter inference --filter hub --filter tasks --filter jinja publish --force --no-git-checks --registry http://localhost:4874/ | |
| - name: E2E test - test yarn install | |
| working-directory: e2e/ts | |
| run: | | |
| npm i -g yarn --force | |
| # yarn now looks at root package.json for the package manager... | |
| mv ../../package.json ../../package.json.bk | |
| yarn install --registry http://localhost:4874/ | |
| mv ../../package.json.bk ../../package.json | |
| - name: E2E test - typescript node project | |
| working-directory: e2e/ts | |
| run: | | |
| pnpm i --ignore-workspace --registry http://localhost:4874/ | |
| pnpm start | |
| env: | |
| token: ${{ secrets.HF_TOKEN }} | |
| - name: E2E test - svelte app build | |
| working-directory: e2e/svelte | |
| run: | | |
| pnpm i --ignore-workspace --registry http://localhost:4874/ | |
| pnpm build | |
| pnpm run test:browser | |
| - uses: denoland/setup-deno@v1 | |
| with: | |
| deno-version: vx.x.x | |
| - name: E2E test - deno import from npm | |
| working-directory: e2e/deno | |
| run: deno run --allow-read --allow-net --allow-env=HF_TOKEN index.ts | |
| env: | |
| NPM_CONFIG_REGISTRY: http://localhost:4874/ | |
| HF_TOKEN: ${{ secrets.HF_TOKEN }} | |
Xet Storage Details
- Size:
- 4.9 kB
- Xet hash:
- 531fe8c6cf98cfe5368df403c1843c66fc6a14b6dad2c61521a6d3e1b466481e
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.