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:
|
|
|
|
pull_request:
|
|
|
|
branches:
|
|
|
|
- master
|
|
|
|
- staging
|
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-03-23 17:55:31 +00:00
|
|
|
steps:
|
|
|
|
- id: skip_lang_check
|
|
|
|
name: Check if the changes are about squiggle-lang src files
|
|
|
|
uses: fkirc/skip-duplicate-actions@master
|
|
|
|
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
|
|
|
|
uses: fkirc/skip-duplicate-actions@master
|
|
|
|
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
|
|
|
|
uses: fkirc/skip-duplicate-actions@master
|
|
|
|
with:
|
2022-04-02 13:41:29 +00:00
|
|
|
paths: '["packages/website/**"]'
|
2022-03-23 17:55:31 +00:00
|
|
|
|
2022-04-11 04:19:04 +00:00
|
|
|
lang-lint:
|
|
|
|
name: Language lint
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
needs: pre_check
|
2022-04-11 05:08:54 +00:00
|
|
|
if: ${{ needs.pre_check.outputs.should_skip_lang != 'true' }}
|
2022-04-11 04:19:04 +00:00
|
|
|
defaults:
|
|
|
|
run:
|
|
|
|
shell: bash
|
|
|
|
working-directory: packages/squiggle-lang
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Check lint
|
|
|
|
run: yarn lint
|
|
|
|
|
2022-03-23 17:55:31 +00:00
|
|
|
lang-build-test:
|
2022-03-23 19:23:47 +00:00
|
|
|
name: Language build and test
|
2022-03-23 17:55:31 +00:00
|
|
|
runs-on: ubuntu-latest
|
2022-04-11 04:53:02 +00:00
|
|
|
needs: pre_check
|
2022-04-11 05:23:09 +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:
|
|
|
|
- uses: actions/checkout@v2
|
2022-03-24 23:27:17 +00:00
|
|
|
- name: Install dependencies from monorepo level
|
|
|
|
run: cd ../../ && yarn
|
2022-03-23 18:35:20 +00:00
|
|
|
- name: Build rescript codebase
|
2022-03-23 17:55:31 +00:00
|
|
|
run: yarn build
|
|
|
|
- name: Run tests
|
|
|
|
run: yarn test
|
2022-03-24 23:57:52 +00:00
|
|
|
- name: Run webpack
|
2022-03-23 22:34:50 +00:00
|
|
|
run: yarn bundle
|
2022-03-23 17:55:31 +00:00
|
|
|
|
|
|
|
components-build-test:
|
2022-03-23 19:23:47 +00:00
|
|
|
name: Components build and test
|
2022-03-23 17:55:31 +00:00
|
|
|
runs-on: ubuntu-latest
|
2022-04-11 04:19:04 +00:00
|
|
|
needs: pre_check
|
2022-04-11 05:05:47 +00:00
|
|
|
if: ${{ (needs.pre_check.outputs.should_skip_components != 'true') || (needs.pre_check.outputs.should_skip_lang != 'true') }}
|
2022-03-23 17:55:31 +00:00
|
|
|
defaults:
|
|
|
|
run:
|
|
|
|
shell: bash
|
|
|
|
working-directory: packages/components
|
|
|
|
steps:
|
2022-03-23 18:17:00 +00:00
|
|
|
- uses: actions/checkout@v2
|
2022-03-24 23:27:17 +00:00
|
|
|
- name: Install dependencies from monorepo level
|
|
|
|
run: cd ../../ && yarn
|
2022-03-25 16:45:40 +00:00
|
|
|
- name: Build rescript codebase in squiggle-lang
|
2022-03-24 23:29:43 +00:00
|
|
|
run: cd ../squiggle-lang && yarn build
|
2022-03-25 00:06:52 +00:00
|
|
|
- name: Run webpack
|
2022-03-23 22:34:50 +00:00
|
|
|
run: yarn bundle
|
2022-03-24 01:58:53 +00:00
|
|
|
- name: Build storybook
|
|
|
|
run: yarn build
|
2022-03-23 22:51:53 +00:00
|
|
|
|
2022-03-24 18:21:54 +00:00
|
|
|
website-build:
|
|
|
|
name: Website build
|
2022-03-23 22:51:53 +00:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
needs: pre_check
|
2022-04-11 05:08:54 +00:00
|
|
|
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') }}
|
2022-03-23 22:51:53 +00:00
|
|
|
defaults:
|
|
|
|
run:
|
|
|
|
shell: bash
|
|
|
|
working-directory: packages/website
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
2022-03-25 03:12:14 +00:00
|
|
|
- name: Install dependencies from monorepo level
|
|
|
|
run: cd ../../ && yarn
|
|
|
|
- name: Build rescript in squiggle-lang
|
|
|
|
run: cd ../squiggle-lang && yarn build
|
2022-03-23 22:51:53 +00:00
|
|
|
- name: Build website assets
|
|
|
|
run: yarn build
|