Skip to content

Commit

Permalink
Node support (#185)
Browse files Browse the repository at this point in the history
* Expose Node package (#161)

* Set up Node build and Node integration tests

* Cut canary release (#179)

* Remove postinstall set:tfjs command (#182)

* Move set:tfjs to prepare step

* Publish next canary version

* Add Node Example to examples folder (#181)

* Update example script (#183)

* Support a GPU build (#184)

* Integration Tests for Loading Model in Browser (#186)

* Add tests for loading models via Node (#187)

* Add test to ensure model definitions are loaded in browser (#188)

* Add test to ensure model definitions are loaded in Node (#189)

* Bump versions

* Add image unit tests (#191)

* Separate image.ts into separate files and add it to the generation script (#192)

* Add integration test for upscaling a rank 4 tensor (#193)

* Leverage tf.browser.fromPixels on input (#194)

* Manipulated scaffolding code to ensure build processes are referencing the correct builds (#195)

* Move all but browser tests to leverage puppeteer (#196)

* Remove generated files from repo (#197)

* Do not include generated files in repo

* Add script to scaffold browser generated files after installing

* Scaffold on install (#198)

* Do not include generated files in repo

* Add script to scaffold browser generated files after installing

* Enforce minimum Node version (#199)

* Specify exact version of Node for unit tests, and add 14- and 16- specific Node integration tests (#201)

* Disable CI cache (#204)

* Update changelog (#203)

* Add umd field in package json (#202)

* Migrate linter (#200)

Migrate linter from tslint to eslint

* Bump lowest node support to 16 (#205)

* Bump lowest node support to 16

* Add support for image loading in Node (#206)

* Remove scaffolding step (#207)

* Add an integration test checking patch sizes (#211)

* Sets up in-browser unit testing for *.browser tests (#210)

* Add an example for loading a model locally in Node (#212)

* Fix leaking tensors (#213)

* Update package.json scripts to enable publishing (#214)

* Update documentation to include Node (#215)

* Update scripts for updating version across repo (#218)
  • Loading branch information
thekevinscott authored Feb 27, 2022
1 parent af5e55d commit 6063b00
Show file tree
Hide file tree
Showing 110 changed files with 7,930 additions and 4,008 deletions.
124 changes: 119 additions & 5 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,70 @@ name: 'Tests'
on: [push]

jobs:
unit:
name: 'Tests: Unit'
memory-leaks:
name: 'Memory Leaks'
runs-on: ubuntu-latest
steps:
- name: 'Checkout repository'
uses: actions/checkout@v2

- uses: actions/setup-node@v2
with:
node-version: '16'

- uses: actions/cache@v2
with:
path: '**/node_modules'
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}

- name: 'Installing'
run: yarn

- name: 'Unit Tests / Jest'
run: yarn test:memory-leaks

unit-browser:
name: 'Unit / Browser'
runs-on: ubuntu-latest
steps:
- name: 'Checkout repository'
uses: actions/checkout@v2

- uses: actions/setup-node@v2
with:
node-version: '16'

- uses: actions/cache@v2
with:
path: '**/node_modules'
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}

- name: 'Installing'
run: yarn

- name: 'Unit Tests / Jest'
run: yarn test:unit:browser:jest

- name: 'Unit Tests / Playwright'
run: yarn test:unit:browser:playwright

- name: 'Codecov'
uses: codecov/codecov-action@v1
with:
directory: ./packages/upscalerjs/coverage
verbose: true

unit-node:
name: 'Unit / Node'
runs-on: ubuntu-latest
steps:
- name: 'Checkout repository'
uses: actions/checkout@v2

- uses: actions/setup-node@v2
with:
node-version: '16'

- uses: actions/cache@v2
with:
path: '**/node_modules'
Expand All @@ -18,16 +75,44 @@ jobs:
run: yarn

- name: 'Unit Tests'
run: yarn test:unit
run: yarn test:unit:node

- name: 'Codecov'
uses: codecov/codecov-action@v1
with:
directory: ./packages/upscalerjs/coverage
verbose: true

integration-browser:
name: 'Tests: Integration / Browser'
integration-browser-browserstack:
name: 'Integration / Browser / Browserstack'
runs-on: ubuntu-latest
steps:
- name: 'BrowserStack Env Setup' # Invokes the setup-env action
uses: browserstack/github-actions/setup-env@master
with:
username: ${{ secrets.BROWSERSTACK_USERNAME }}
access-key: ${{ secrets.BROWSERSTACK_ACCESS_KEY }}

- name: 'Checkout repository'
uses: actions/checkout@v2

- uses: actions/cache@v2
with:
path: '**/node_modules'
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}

- name: 'Installing'
env:
NODE_OPTIONS: --max_old_space_size=8192
run: yarn

- name: 'Integration Tests'
run: yarn test:integration:browserstack --ci
env:
NODE_OPTIONS: --max_old_space_size=8192

integration-browser-local:
name: 'Integration / Browser / Local'
runs-on: ubuntu-latest
steps:
- name: 'BrowserStack Env Setup' # Invokes the setup-env action
Expand All @@ -53,3 +138,32 @@ jobs:
run: yarn test:integration:browser --ci
env:
NODE_OPTIONS: --max_old_space_size=8192

integration-node-local-16:
name: 'Integration / Node / Local / v16'
runs-on: ubuntu-latest
steps:
- name: 'Checkout repository'
uses: actions/checkout@v2

- uses: actions/setup-node@v2
with:
node-version: '16'

- uses: actions/cache@v2
with:
path: '**/node_modules'
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}

- name: 'Installing'
env:
NODE_OPTIONS: --max_old_space_size=8192
run: yarn

- name: 'Installing Node-specific deps'
env:
NODE_OPTIONS: --max_old_space_size=8192
run: cd test/lib/node && yarn

- name: 'Integration Tests'
run: yarn test:integration:node --ci
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,5 @@ credentials.yml
diff.png
upscaled.png
scratch
packages/upscalerjs/src/tfjs.ts
*.generated.ts
Loading

0 comments on commit 6063b00

Please sign in to comment.