Skip to content

Fix and rework GPT-TF.js #2340

Fix and rework GPT-TF.js

Fix and rework GPT-TF.js #2340

name: lint-test-build
on:
push:
branches: [develop]
pull_request:
permissions:
contents: read
jobs:
download-datasets:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
lfs: true
submodules: true
- uses: actions/cache@v4
with:
path: datasets
key: datasets-${{ hashFiles('datasets/**') }}
- run: datasets/populate
lint-lib:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
cache: npm
- run: npm ci
- run: npm --workspace=discojs run lint
lint-lib-node:
needs: build-lib
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
cache: npm
- run: npm ci
- run: npm --workspace=discojs run build
- run: npm --workspace=discojs-node run lint
lint-lib-web:
needs: build-lib
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
cache: npm
- run: npm ci
- run: npm --workspace=discojs run build
- run: npm --workspace=discojs-web run lint
lint-server:
needs: [build-lib, build-lib-node]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
cache: npm
- run: npm ci
- run: npm --workspace={discojs,discojs-node} run build
- run: npm --workspace=server run lint
lint-cli:
needs: [build-lib, build-lib-node, build-server]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
cache: npm
- run: npm ci
- run: npm --workspace={discojs,discojs-node,server} run build
- run: npm --workspace=cli run lint
lint-webapp:
needs: [build-lib, build-lib-web]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
cache: npm
- run: npm ci
- run: npm --workspace={discojs,discojs-web} run build
- run: npm --workspace=webapp run lint
lint-docs-examples:
needs: [build-lib, build-lib-node, build-server]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
cache: npm
- run: npm ci
- run: npm --workspace={discojs,discojs-node,server} run build
- run: npm run lint
working-directory: docs/examples
build-lib:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
cache: npm
- run: npm ci
- run: npm --workspace=discojs run build
build-lib-node:
needs: build-lib
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
cache: npm
- run: npm ci
- run: npm --workspace=discojs run build
- run: npm --workspace=discojs-node run build
build-lib-web:
needs: build-lib
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
cache: npm
- run: npm ci
- run: npm run --workspace=discojs build
- run: npm run --workspace=discojs-web build
build-server:
needs: [build-lib, build-lib-node]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
cache: npm
- run: npm ci
- run: npm run --workspace={discojs,discojs-node} build
- run: npm run --workspace=server build
build-server-docker:
needs: build-server
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: docker/setup-buildx-action@v3
with:
install: true
- run: docker build .
build-cli:
needs: [build-lib, build-lib-node, build-server]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
cache: npm
- run: npm ci
- run: npm run --workspace={discojs,discojs-node,server} build
- run: npm run --workspace=cli build
build-webapp:
needs: [build-lib, build-lib-web]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
cache: npm
- run: npm ci
- run: npm --workspace={discojs,discojs-web} run build
- run: npm --workspace=webapp run build
build-docs-examples:
needs: [build-lib, build-lib-node, build-server]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
cache: npm
- run: npm ci
- run: npm --workspace={discojs,discojs-node,server} run build
- run: npm run build
working-directory: docs/examples
test-lib:
needs: [build-lib, download-datasets]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
lfs: true
submodules: true
- uses: actions/cache@v4
with:
path: datasets
key: datasets-${{ hashFiles('datasets/**') }}
- uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
cache: npm
- run: npm ci
- run: npm --workspace=discojs test
test-lib-node:
needs: [build-lib, download-datasets]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
lfs: true
submodules: true
- uses: actions/cache@v4
with:
path: datasets
key: datasets-${{ hashFiles('datasets/**') }}
- uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
cache: npm
- run: npm ci
- run: npm --workspace=discojs run build
- run: npm --workspace=discojs-node test
test-lib-web:
needs: [build-lib]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
lfs: true
submodules: true
- uses: actions/cache@v4
with:
path: datasets
key: datasets-${{ hashFiles('datasets/**') }}
- uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
cache: npm
- run: npm ci
- run: npm --workspace=discojs run build
- run: npm --workspace=discojs-web test
test-server:
needs: [build-lib, build-lib-node, download-datasets]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
lfs: true
submodules: true
- uses: actions/cache@v4
with:
path: datasets
key: datasets-${{ hashFiles('datasets/**') }}
- uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
cache: npm
- run: npm ci
- run: npm --workspace={discojs,discojs-node} run build
- run: npm --workspace=server test
test-webapp:
needs: [build-lib, build-lib-web, download-datasets]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
lfs: true
submodules: true
- uses: actions/cache@v4
with:
path: datasets
key: datasets-${{ hashFiles('datasets/**') }}
- uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
cache: npm
- run: npm ci
- run: npm --workspace={discojs,discojs-web} run build
- run: npm --workspace=webapp run test:unit
- uses: cypress-io/github-action@v6
with:
working-directory: webapp
install: false
start: npm start
env:
VITE_SERVER_URL: http://server
test-cli:
needs: [build-lib, build-lib-node, build-server, download-datasets]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
lfs: true
submodules: true
- uses: actions/cache@v4
with:
path: datasets
key: datasets-${{ hashFiles('datasets/**') }}
- uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
cache: npm
- run: npm ci
- run: npm --workspace={discojs,discojs-node,server} run build
- run: npm --workspace=cli start -- -t cifar10 -u 3 -e 1 -r 1
test-docs-examples:
needs: [build-lib, build-lib-node, build-server, download-datasets]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
lfs: true
submodules: true
- uses: actions/cache@v4
with:
path: datasets
key: datasets-${{ hashFiles('datasets/**') }}
- uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
cache: npm
- run: npm ci
- run: npm --workspace={discojs,discojs-node,server} run build
- run: npm run test
working-directory: docs/examples