2022-03-23 19:23:47 +00:00
|
|
|
name: Squiggle packages check
|
2022-03-23 17:55:31 +00:00
|
|
|
|
2022-03-25 17:52:51 +00:00
|
|
|
on:
|
2022-04-12 00:49:02 +00:00
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- master
|
|
|
|
- develop
|
2022-03-25 17:52:51 +00:00
|
|
|
pull_request:
|
|
|
|
branches:
|
|
|
|
- master
|
2022-04-11 21:41:40 +00:00
|
|
|
- develop
|
2022-04-27 16:10:32 +00:00
|
|
|
- reducer-dev
|
2022-08-30 03:36:32 +00:00
|
|
|
- epic-reducer-project
|
2022-09-28 13:52:45 +00:00
|
|
|
- epic-0.5.0
|
2022-03-23 17:55:31 +00:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
pre_check:
|
2022-03-23 18:35:20 +00:00
|
|
|
name: Precheck for skipping redundant jobs
|
2022-03-23 17:55:31 +00:00
|
|
|
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 }}
|
2022-03-23 22:51:53 +00:00
|
|
|
should_skip_website: ${{ steps.skip_website_check.outputs.should_skip }}
|
2022-06-20 15:52:54 +00:00
|
|
|
should_skip_vscodeext: ${{ steps.skip_vscodeext_check.outputs.should_skip }}
|
2022-06-20 16:46:43 +00:00
|
|
|
should_skip_cli: ${{ steps.skip_cli_check.outputs.should_skip }}
|
2022-03-23 17:55:31 +00:00
|
|
|
steps:
|
|
|
|
- id: skip_lang_check
|
|
|
|
name: Check if the changes are about squiggle-lang src files
|
2022-10-03 14:42:35 +00:00
|
|
|
uses: fkirc/skip-duplicate-actions@v5.2.0
|
2022-03-23 17:55:31 +00:00
|
|
|
with:
|
2022-04-02 13:41:29 +00:00
|
|
|
paths: '["packages/squiggle-lang/**"]'
|
2022-03-23 17:55:31 +00:00
|
|
|
- id: skip_components_check
|
|
|
|
name: Check if the changes are about components src files
|
2022-10-03 14:42:35 +00:00
|
|
|
uses: fkirc/skip-duplicate-actions@v5.2.0
|
2022-03-23 17:55:31 +00:00
|
|
|
with:
|
2022-04-02 13:41:29 +00:00
|
|
|
paths: '["packages/components/**"]'
|
2022-03-23 22:51:53 +00:00
|
|
|
- id: skip_website_check
|
|
|
|
name: Check if the changes are about website src files
|
2022-10-03 14:42:35 +00:00
|
|
|
uses: fkirc/skip-duplicate-actions@v5.2.0
|
2022-03-23 22:51:53 +00:00
|
|
|
with:
|
2022-04-02 13:41:29 +00:00
|
|
|
paths: '["packages/website/**"]'
|
2022-06-20 15:52:54 +00:00
|
|
|
- id: skip_vscodeext_check
|
|
|
|
name: Check if the changes are about vscode extension src files
|
2022-10-03 14:42:35 +00:00
|
|
|
uses: fkirc/skip-duplicate-actions@v5.2.0
|
2022-06-20 15:52:54 +00:00
|
|
|
with:
|
|
|
|
paths: '["packages/vscode-ext/**"]'
|
2022-06-20 16:46:43 +00:00
|
|
|
- id: skip_cli_check
|
|
|
|
name: Check if the changes are about cli src files
|
2022-10-03 14:42:35 +00:00
|
|
|
uses: fkirc/skip-duplicate-actions@v5.2.0
|
2022-06-20 16:46:43 +00:00
|
|
|
with:
|
|
|
|
paths: '["packages/cli/**"]'
|
2022-03-23 17:55:31 +00:00
|
|
|
|
2022-09-12 05:50:21 +00:00
|
|
|
lang-lint:
|
|
|
|
name: Language lint
|
|
|
|
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@v3
|
|
|
|
- name: Install Dependencies
|
|
|
|
run: cd ../../ && yarn
|
|
|
|
- name: Check rescript lint
|
|
|
|
run: yarn lint:rescript
|
|
|
|
- name: Check javascript, typescript, and markdown lint
|
|
|
|
uses: creyD/prettier_action@v4.2
|
|
|
|
with:
|
|
|
|
dry: true
|
|
|
|
prettier_options: --check packages/squiggle-lang
|
2022-04-11 04:19:04 +00:00
|
|
|
|
2022-04-11 05:27:21 +00:00
|
|
|
lang-build-test-bundle:
|
|
|
|
name: Language build, test, and bundle
|
2022-03-23 17:55:31 +00:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
needs: pre_check
|
2022-03-24 23:27:17 +00:00
|
|
|
if: ${{ needs.pre_check.outputs.should_skip_lang != 'true' }}
|
2022-03-23 17:55:31 +00:00
|
|
|
defaults:
|
|
|
|
run:
|
|
|
|
shell: bash
|
|
|
|
working-directory: packages/squiggle-lang
|
|
|
|
steps:
|
2022-08-04 13:10:53 +00:00
|
|
|
- uses: actions/checkout@v3
|
2022-05-10 20:13:49 +00:00
|
|
|
with:
|
|
|
|
fetch-depth: 2
|
2022-04-12 05:41:36 +00:00
|
|
|
- name: Install dependencies from monorepo level
|
|
|
|
run: cd ../../ && yarn
|
|
|
|
- name: Build rescript codebase
|
|
|
|
run: yarn build
|
2022-04-20 02:58:09 +00:00
|
|
|
- name: Run rescript tests
|
|
|
|
run: yarn test:rescript
|
|
|
|
- name: Run typescript tests
|
|
|
|
run: yarn test:ts
|
2022-04-12 05:41:36 +00:00
|
|
|
- name: Run webpack
|
|
|
|
run: yarn bundle
|
2022-04-20 02:58:09 +00:00
|
|
|
- name: Upload rescript coverage report
|
|
|
|
run: yarn coverage:rescript:ci
|
|
|
|
- name: Upload typescript coverage report
|
|
|
|
run: yarn coverage:ts:ci
|
2022-04-20 03:42:24 +00:00
|
|
|
|
2022-09-12 05:50:21 +00:00
|
|
|
components-lint:
|
|
|
|
name: Components lint
|
|
|
|
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:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
- name: Check javascript, typescript, and markdown lint
|
|
|
|
uses: creyD/prettier_action@v4.2
|
|
|
|
with:
|
|
|
|
dry: true
|
|
|
|
prettier_options: --check packages/components --ignore-path packages/components/.prettierignore
|
2022-04-11 22:56:24 +00:00
|
|
|
|
2022-09-12 05:50:21 +00:00
|
|
|
components-bundle-build:
|
|
|
|
name: Components bundle and build
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
needs: pre_check
|
|
|
|
if: ${{ (needs.pre_check.outputs.should_skip_components != 'true') || (needs.pre_check.outputs.should_skip_lang != 'true') }}
|
|
|
|
defaults:
|
|
|
|
run:
|
|
|
|
shell: bash
|
|
|
|
working-directory: packages/components
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
- name: Install dependencies from monorepo level
|
|
|
|
run: cd ../../ && yarn
|
|
|
|
- name: Build rescript codebase in squiggle-lang
|
|
|
|
run: cd ../squiggle-lang && yarn build
|
|
|
|
- name: Run webpack
|
|
|
|
run: yarn bundle
|
|
|
|
- name: Build storybook
|
|
|
|
run: yarn build
|
|
|
|
|
|
|
|
website-lint:
|
|
|
|
name: Website lint
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
needs: pre_check
|
|
|
|
if: ${{ needs.pre_check.outputs.should_skip_website != 'true' }}
|
|
|
|
defaults:
|
|
|
|
run:
|
|
|
|
shell: bash
|
|
|
|
working-directory: packages/website
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
- name: Check javascript, typescript, and markdown lint
|
|
|
|
uses: creyD/prettier_action@v4.2
|
|
|
|
with:
|
|
|
|
dry: true
|
|
|
|
prettier_options: --check packages/website
|
|
|
|
|
|
|
|
website-build:
|
|
|
|
name: Website build
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
needs: pre_check
|
|
|
|
if: ${{ (needs.pre_check.outputs.should_skip_website != 'true') || (needs.pre_check.outputs.should_skip_lang != 'true') || (needs.pre_check.outputs.should_skip_components != 'true') }}
|
|
|
|
defaults:
|
|
|
|
run:
|
|
|
|
shell: bash
|
|
|
|
working-directory: packages/website
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
- name: Install dependencies from monorepo level
|
|
|
|
run: cd ../../ && yarn
|
|
|
|
- name: Build rescript in squiggle-lang
|
|
|
|
run: cd ../squiggle-lang && yarn build
|
|
|
|
- name: Build components
|
|
|
|
run: cd ../components && yarn build
|
|
|
|
- name: Build website assets
|
|
|
|
run: yarn build
|
|
|
|
|
|
|
|
vscode-ext-lint:
|
|
|
|
name: VS Code extension lint
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
needs: pre_check
|
|
|
|
if: ${{ needs.pre_check.outputs.should_skip_vscodeext != 'true' }}
|
|
|
|
defaults:
|
|
|
|
run:
|
|
|
|
shell: bash
|
|
|
|
working-directory: packages/vscode-ext
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
- name: Check javascript, typescript, and markdown lint
|
|
|
|
uses: creyD/prettier_action@v4.2
|
|
|
|
with:
|
|
|
|
dry: true
|
|
|
|
prettier_options: --check packages/vscode-ext
|
2022-06-20 15:52:54 +00:00
|
|
|
|
|
|
|
vscode-ext-build:
|
2022-06-20 16:12:47 +00:00
|
|
|
name: VS Code extension build
|
2022-06-20 15:52:54 +00:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
needs: pre_check
|
|
|
|
if: ${{ (needs.pre_check.outputs.should_skip_components != 'true') || (needs.pre_check.outputs.should_skip_lang != 'true') }} || (needs.pre_check.outputs.should_skip_vscodeext != 'true') }}
|
|
|
|
defaults:
|
|
|
|
run:
|
|
|
|
shell: bash
|
|
|
|
working-directory: packages/vscode-ext
|
|
|
|
steps:
|
2022-08-04 13:10:53 +00:00
|
|
|
- uses: actions/checkout@v3
|
2022-06-20 15:52:54 +00:00
|
|
|
- name: Install dependencies from monorepo level
|
|
|
|
run: cd ../../ && yarn
|
|
|
|
- name: Build
|
|
|
|
run: yarn compile
|
2022-09-12 05:50:21 +00:00
|
|
|
cli-lint:
|
|
|
|
name: CLI lint
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
needs: pre_check
|
|
|
|
if: ${{ needs.pre_check.outputs.should_skip_cli != 'true' }}
|
|
|
|
defaults:
|
|
|
|
run:
|
|
|
|
shell: bash
|
|
|
|
working-directory: packages/cli
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
- name: Check javascript, typescript, and markdown lint
|
|
|
|
uses: creyD/prettier_action@v4.2
|
|
|
|
with:
|
|
|
|
dry: true
|
|
|
|
prettier_options: --check packages/cli
|