added components to ci

This commit is contained in:
Quinn Dougherty 2022-03-23 13:55:31 -04:00
parent 44669e1d73
commit 16213ddddb
5 changed files with 65 additions and 26 deletions

58
.github/workflows/ci.yaml vendored Normal file
View File

@ -0,0 +1,58 @@
name: Squiggle Lang Jest Tests
on: [push]
jobs:
pre_check:
runs-on: ubuntu-latest
outputs:
should_skip_lang: ${{ steps.skip_lang_check.outputs.should_skip }}
should_skip_components: ${{ steps.skip_components_check.outputs.should_skip }}
steps:
- id: skip_lang_check
name: Check if the changes are about squiggle-lang src files
uses: fkirc/skip-duplicate-actions@master
with:
paths: '["packages/squiggle-lange/*"]'
- id: skip_components_check
name: Check if the changes are about components src files
uses: fkirc/skip-duplicate-actions@master
with:
paths: '["packages/components/*"]'
lang-build-test:
name: Squiggle language build and test
runs-on: ubuntu-latest
needs: pre_check
if: ${{ needs.pre_check.outputs.should_skip_lang != 'true' }}
defaults:
run:
shell: bash
working-directory: packages/squiggle-lang
steps:
- uses: actions/checkout@v2
- name: Install packages
run: yarn
- name: Build rescript
run: yarn build
- name: Run tests
run: yarn test
components-build-test:
name: Squiggle components build and test
runs-on: ubuntu-latest
needs: pre_check
if: ${{ needs.pre_check.outputs.should_skip_components != 'true' }}
defaults:
run:
shell: bash
working-directory: packages/components
steps:
- users: actions/checkout@v2
- name: Install packages
run: yarn
- name: See if storybook builds
run: yarn build-storybook
- name: Run tsc
run: yarn ci

View File

@ -1,19 +0,0 @@
name: Squiggle Lang Jest Tests
on: [push]
jobs:
build:
runs-on: ubuntu-latest
defaults:
run:
shell: bash
working-directory: packages/squiggle-lang
steps:
- uses: actions/checkout@v2
- name: Install Packages
run: yarn
- name: Build rescript
run: yarn run build
- name: Run tests
run: yarn test

View File

@ -27,8 +27,8 @@ the components library and the playground.
Scripts are available for you in the root directory to do important activities,
such as:
`yarn build:lang`. Builds and packages the language
`yarn storybook:components`. Hosts the component storybook
- `yarn build:lang`. Builds and packages the language
- `yarn storybook:components`. Hosts the component storybook
# Local playground

View File

@ -7,9 +7,9 @@
"build-storybook:components": "cd packages/components && yarn && yarn build-storybook",
"build:components": "cd packages/components && yarn && yarn package",
"build:playground": "cd packages/playground && yarn && yarn parcel-build",
"ci:lang": "yarn workspace @squiggle/lang ci",
"ci:components": "yarn ci:lang && yarn workspace @squiggle/components ci",
"ci:playground": "yarn ci:components && yarn workspace @squiggle/playground ci"
"ci:lang": "yarn workspace @quri/squiggle-lang ci",
"ci:components": "yarn ci:lang && yarn workspace @quri/squiggle-components ci",
"ci:playground": "yarn ci:components && yarn workspace @quri/squiggle-playground ci"
},
"workspaces": [
"packages/*"

View File

@ -1,14 +1,14 @@
{
"name": "@quri/squiggle-lang",
"version": "0.2.2",
"homepage": "https://foretold-app.github.io/estiband/",
"homepage": "https://squiggle-language.com",
"scripts": {
"build": "rescript build -with-deps",
"bundle": "tsc && webpack",
"start": "rescript build -w -with-deps",
"clean": "rescript clean",
"test": "jest",
"test:ci": "yarn jest ./__tests__/Lodash__test.re",
"test:ci": "yarn jest ./__tests__/Lodash__test.res",
"watch:test": "jest --watchAll",
"watch:s": "yarn jest -- Converter_test --watch",
"package": "tsc",