mirror of
https://github.com/ProvableHQ/leo.git
synced 2024-12-24 02:31:44 +03:00
adds a CI
This commit is contained in:
parent
1ffcede96c
commit
5d7fea6215
48
.github/workflows/wasm.yml
vendored
Normal file
48
.github/workflows/wasm.yml
vendored
Normal file
@ -0,0 +1,48 @@
|
||||
name: CI
|
||||
on:
|
||||
pull_request:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
- staging
|
||||
- trying
|
||||
paths-ignore:
|
||||
- 'docs/**'
|
||||
- 'documentation/**'
|
||||
env:
|
||||
RUST_BACKTRACE: 1
|
||||
|
||||
jobs:
|
||||
test-wasm-parser:
|
||||
name: Test Package ${{ matrix.os }}
|
||||
runs-on: ${{ matrix.os }}
|
||||
defaults:
|
||||
run:
|
||||
working-directory: wasm
|
||||
strategy:
|
||||
matrix:
|
||||
os: [macOS-latest, windows-latest, ubuntu-latest]
|
||||
include:
|
||||
- os: ubuntu-latest
|
||||
sccache-path: /home/runner/.cache/sccache
|
||||
- os: macos-latest
|
||||
sccache-path: /Users/runner/Library/Caches/Mozilla.sccache
|
||||
- os: windows-latest
|
||||
sccache-path: "C:\\Users\\runneradmin\\AppData\\Local\\Mozilla\\sccache"
|
||||
env:
|
||||
RUSTC_WRAPPER: sccache
|
||||
SCCACHE_CACHE_SIZE: 2G
|
||||
SCCACHE_DIR: ${{ matrix.sccache-path }}
|
||||
# SCCACHE_RECACHE: 1 # Uncomment this to clear cache, then comment it back out
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
- name: Install wasm-pack
|
||||
run: npm install -g wasm-pack
|
||||
- name: Run wasm-pack
|
||||
run: wasm-pack build --dev --target nodejs
|
||||
- name: Install dependencies and run tests
|
||||
run: cd tests && npm ci && npm test
|
||||
|
||||
|
||||
|
1
wasm/tests/.gitignore
vendored
1
wasm/tests/.gitignore
vendored
@ -1,2 +1 @@
|
||||
node_modules
|
||||
dist
|
||||
|
@ -2,9 +2,10 @@
|
||||
"name": "parser-wasm-tests",
|
||||
"version": "0.1.0",
|
||||
"description": "Test Framework implementation for compiler tests in WASM",
|
||||
"main": "index.js",
|
||||
"main": "dist/index.js",
|
||||
"scripts": {
|
||||
"compile": "tsc -p ./"
|
||||
"compile": "tsc -p ./",
|
||||
"test": "npm run compile && node dist/index.js"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
@ -18,7 +18,6 @@ import * as fs from 'fs';
|
||||
import * as path from 'path';
|
||||
import * as parser from '../../pkg/leo_wasm';
|
||||
import * as yaml from 'js-yaml';
|
||||
import {JSON_SCHEMA, CORE_SCHEMA, DEFAULT_SCHEMA} from 'js-yaml';
|
||||
|
||||
// Path to the parser tests folder
|
||||
const TESTS_PATH: string = path.join(__dirname, '../../../tests/parser');
|
||||
|
Loading…
Reference in New Issue
Block a user