Skip to content

Merge pull request #137 from superfaceai/chore/update_javy #559

Merge pull request #137 from superfaceai/chore/update_javy

Merge pull request #137 from superfaceai/chore/update_javy #559

Workflow file for this run

name: CI/CD
on: push
jobs:
core:
name: Core
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/build_core
with:
CARGO_PROFILE: 'debug'
CORE_WASM: 'upload'
TEST_CORE_WASM: 'upload'
COMLINK_WASM: 'upload'
- name: Install Wasmtime
run: |
curl https://wasmtime.dev/install.sh -sSf | bash
echo $HOME/.wasmtime/bin >> $GITHUB_PATH
# test
- name: Run tests
working-directory: core
run: cargo test
core_js:
name: Core JS (Map STD)
runs-on: ubuntu-latest
steps:
# checkout
- uses: actions/checkout@v4
# setup
- uses: actions/setup-node@v4
with:
registry-url: https://registry.npmjs.org/
node-version: "18"
cache: yarn
cache-dependency-path: core_js/yarn.lock
# test and build
- name: Install Yarn dependencies
working-directory: core_js
run: yarn install --frozen-lockfile
## first we need map-std which is used in profile-validator
- name: Build Map STD
working-directory: core_js/map-std
run: yarn build
- name: Test Map STD
working-directory: core_js/map-std
run: yarn test
- name: Build Profile validator
working-directory: core_js/profile-validator
run: yarn build
- name: Test Profile validator
working-directory: core_js/profile-validator
run: yarn test
host-nodejs:
name: Node.js Host
needs: [core]
runs-on: ubuntu-latest
defaults:
run:
working-directory: packages/nodejs_host
steps:
# checkout
- uses: actions/checkout@v4
# setup
- uses: actions/setup-node@v4
with:
registry-url: https://registry.npmjs.org/
node-version: "18"
cache: yarn
cache-dependency-path: packages/nodejs_host/yarn.lock
- uses: actions/download-artifact@v4
with:
name: core-async-wasm
path: packages/nodejs_host/assets
- uses: actions/download-artifact@v4
with:
name: test-core-async-wasm
path: packages/nodejs_host/assets
# test and build
- name: Install Yarn dependencies
run: yarn install --frozen-lockfile
- name: Build
run: yarn build
- name: Run tests
run: yarn test
host-cfw:
name: Cloudflare worker Host
needs: [core]
runs-on: ubuntu-latest
defaults:
run:
working-directory: packages/cloudflare_worker_host
steps:
# checkout
- uses: actions/checkout@v4
# setup
- uses: actions/setup-node@v4
with:
registry-url: https://registry.npmjs.org/
node-version: "18"
cache: yarn
cache-dependency-path: packages/cloudflare_worker_host/yarn.lock
- uses: actions/download-artifact@v4
with:
name: core-async-wasm
path: packages/cloudflare_worker_host/assets
- uses: actions/download-artifact@v4
with:
name: test-core-async-wasm
path: packages/cloudflare_worker_host/assets
# test and build
- name: Install Yarn dependencies
run: yarn install --frozen-lockfile
- name: Build
run: yarn build
- name: Run tests
run: yarn test
host-python:
name: Python Host
needs: [core]
runs-on: ubuntu-latest
defaults:
run:
working-directory: packages/python_host
steps:
# checkout
- uses: actions/checkout@v4
# setup
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.8"
- uses: actions/download-artifact@v4
with:
name: core-wasm
path: packages/python_host/src/one_sdk/assets
- uses: actions/download-artifact@v4
with:
name: test-core-wasm
path: packages/python_host/src/one_sdk/assets
# test and build
- name: Install dependencies and package locally
run: python -m pip install .
- name: Run tests
run: python -m unittest discover tests/
comlink-nodejs:
name: Node.js Comlink
needs: [core]
runs-on: ubuntu-latest
defaults:
run:
working-directory: packages/nodejs_comlink
steps:
# checkout
- uses: actions/checkout@v4
# setup
- uses: actions/setup-node@v4
with:
registry-url: https://registry.npmjs.org/
node-version: "18"
cache: yarn
cache-dependency-path: packages/nodejs_comlink/yarn.lock
- uses: actions/download-artifact@v4
with:
name: comlink-wasm
path: packages/nodejs_comlink/assets
# test and build
- name: Install Yarn dependencies
run: yarn install --frozen-lockfile
- name: Build
run: yarn build
- name: Run tests
run: yarn test