Skip to content

Workflow file for this run

name: Continuous Integration
on:
pull_request:
branches:
- main
push:
branches:
- main
permissions:
contents: read
env:
OSS_ACCESS_KEY_ID: ${{ secrets.OSS_ACCESS_KEY_ID }}
OSS_ACCESS_KEY_SECRET: ${{ secrets.OSS_ACCESS_KEY_SECRET }}
concurrency:
group: hf-oss-ci-${{ github.ref }}
cancel-in-progress: true
jobs:
test-typescript:
name: TypeScript Tests
runs-on: ubuntu-latest
steps:
- name: Checkout
id: checkout
uses: actions/checkout@v4
- name: Setup Node.js
id: setup-node
uses: actions/setup-node@v4
with:
node-version-file: .node-version
cache: npm
- name: Install Dependencies
id: npm-ci
run: npm ci
- name: Check Format
id: npm-format-check
run: npm run format:check
- name: Lint
id: npm-lint
run: npm run lint
- name: Test
id: npm-ci-test
run: npm run ci-test
list:
name: GitHub Actions Test
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.list-action.outputs.matrix }}
steps:
- name: Checkout
id: checkout
uses: actions/checkout@v4
- run: git clone https://huggingface.co/J5Tsai/debug-static-files
env:
GIT_LFS_SKIP_SMUDGE: 1
- name: Test Local Action
id: list-action
uses: ./actions/list
with:
repo-dir: debug-static-files
- name: Print Output
id: output
run: echo "${{ steps.list-action.outputs.matrix }}"
sync-oss:
name: 'Sync to OSS'
runs-on: ubuntu-latest
needs: list
strategy:
fail-fast: false
max-parallel: 12
matrix: ${{ fromJson(needs.list.outputs.matrix) }}
steps:
- name: Checkout
id: checkout
uses: actions/checkout@v4
- name: Test Local Action
id: list-action
uses: ./actions/sync
with:
urls: ${{ matrix.task.urls }}