Skip to content

Commit

Permalink
Merge with main
Browse files Browse the repository at this point in the history
  • Loading branch information
joshsunshine committed Jan 10, 2022
2 parents 61b34b2 + 4527bea commit 0e9cc24
Show file tree
Hide file tree
Showing 135 changed files with 5,961 additions and 4,601 deletions.
103 changes: 0 additions & 103 deletions .circleci/config.yml

This file was deleted.

142 changes: 142 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,142 @@
name: Build
on:
pull_request:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
env:
CI: false # TODO: eliminate warnings so we don't have to do this
steps:
- name: Checkout
uses: actions/checkout@v2
with:
# https://github.com/lerna/lerna/issues/1893#issuecomment-770614785
fetch-depth: 0
- name: Restore lerna cache
uses: actions/cache@v2
with:
path: |
node_modules
*/*/node_modules
key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
- name: Install deps
run: yarn
- name: Run all builds
run: yarn build
- name: Run all tests
run: yarn test
- name: Make test report dir
run: mkdir -p reports/junit
working-directory: packages/core
- name: Run core tests and generate test data
run: yarn coverage --ci --runInBand --reporters=default --reporters=jest-junit
working-directory: packages/core
- name: Move test report
run: mv junit.xml reports/junit/
working-directory: packages/core
- name: Upload test coverage to codecov
run: bash <(curl -s https://codecov.io/bash)
working-directory: packages/core
# TODO: some equivalent of CircleCI's store_test_results
# with path: packages/core/reports/junit/
- name: Upload all working example diagrams generated by the test suite
uses: actions/upload-artifact@v2
with:
name: diagrams
path: /tmp/diagrams/
- uses: actions/upload-artifact@v2
with:
name: junit
path: packages/core/reports/junit/
- uses: actions/upload-artifact@v2
with:
name: coverage
path: packages/core/coverage
- if: github.event_name == 'push' && github.ref == 'refs/heads/main'
name: Authenticate with registry
run: echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > .npmrc
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- if: github.event_name == 'push' && github.ref == 'refs/heads/main'
name: Publish canary release
run: yarn publish:canary --yes

storybook:
runs-on: ubuntu-latest
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
defaults:
run:
working-directory: ./packages/components
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Restore lerna cache
uses: actions/cache@v2
with:
path: |
node_modules
*/*/node_modules
key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
- name: Install packages
run: yarn
- name: Build core
run: yarn build
working-directory: ./packages/core
- name: Build storybook
run: yarn build-storybook
- name: Deploy docs
uses: JamesIves/github-pages-deploy-action@4.1.4
with:
branch: gh-pages
folder: packages/components/storybook-static
target-folder: storybook
- name: Add .nojekyll
run: |
mkdir extra
touch extra/.nojekyll
- name: Deploy .nojekyll
uses: JamesIves/github-pages-deploy-action@4.1.4
with:
branch: gh-pages
folder: packages/components/extra
clean: false

typedocs:
runs-on: ubuntu-latest
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
defaults:
run:
working-directory: ./packages/core
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Restore lerna cache
uses: actions/cache@v2
with:
path: |
node_modules
*/*/node_modules
key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
- name: Install packages
run: yarn
- name: Build docs
run: yarn docs
- name: Deploy docs
uses: JamesIves/github-pages-deploy-action@4.1.4
with:
branch: gh-pages
folder: packages/core/docs
target-folder: typedoc
- name: Add .nojekyll
run: |
mkdir extra
touch extra/.nojekyll
- name: Deploy .nojekyll
uses: JamesIves/github-pages-deploy-action@4.1.4
with:
branch: gh-pages
folder: packages/core/extra
clean: false
46 changes: 0 additions & 46 deletions .github/workflows/storybook.yml

This file was deleted.

41 changes: 0 additions & 41 deletions .github/workflows/typedocs.yml

This file was deleted.

12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ It's specified by the following Substance and Style programs.
Intersect x y {
constraint overlapping(x, y)
constraint outsideOf(y.label, x)
constraint outsideOf(x.label, y)
constraint disjoint(y.label, x)
constraint disjoint(x.label, y)
}
NoIntersect x y {
Expand All @@ -53,14 +53,14 @@ It's specified by the following Substance and Style programs.
Subset x y {
constraint contains(y, x)
constraint smallerThan(x, y)
constraint outsideOf(y.label, x)
constraint disjoint(y.label, x)
}
NoSubset x y {
objective repel(x, y)
constraint outsideOf(x, y)
constraint outsideOf(y.label, x)
constraint outsideOf(x.label, y)
constraint disjoint(x, y)
constraint disjoint(y.label, x)
constraint disjoint(x.label, y)
constraint nonOverlapping(x, y)
}
```
Expand Down
Loading

0 comments on commit 0e9cc24

Please sign in to comment.