-
Notifications
You must be signed in to change notification settings - Fork 280
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
135 changed files
with
5,961 additions
and
4,601 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.