Skip to content

Commit

Permalink
Merge pull request #4 from system-ui/develop
Browse files Browse the repository at this point in the history
sync fork
  • Loading branch information
fcisio authored Apr 11, 2021
2 parents fae5e1a + a3fafe3 commit 24b8fff
Show file tree
Hide file tree
Showing 191 changed files with 25,020 additions and 2,219 deletions.
1,049 changes: 1,049 additions & 0 deletions .all-contributorsrc

Large diffs are not rendered by default.

60 changes: 48 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ name: CI

on:
pull_request:
types: [opened, synchronize]
push:
branches:
- develop
Expand All @@ -10,22 +11,57 @@ on:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- uses: actions/setup-node@v1
with:
node-version: 14.x

- uses: bahmutov/npm-install@v1
with:
# By default, bahmutov/npm-install uses --frozen-lockfile
install-command: yarn

- name: Run tests and collect coverage
run: yarn test --coverage

- name: Typecheck
run: yarn typecheck
release:
runs-on: ubuntu-latest
needs: [build]
if: >
!contains(github.event.head_commit.message, 'ci skip') &&
!contains(github.event.head_commit.message, 'skip ci') &&
!startsWith(github.event.head_commit.message, 'chore') &&
!startsWith(github.event.pull_request.title, 'chore') && (
github.event_name == 'push' ||
github.event.pull_request.head.repo.full_name == github.repository
)
steps:
- uses: actions/checkout@v2

- name: Prepare repository
run: git fetch --unshallow --tags

- uses: actions/setup-node@v1
with:
node-version: 12.x
- name: Get yarn cache directory path
id: yarn-cache-dir
run: echo "::set-output name=dir::$(yarn cache dir)"
node-version: 14.x

- uses: bahmutov/npm-install@v1

- uses: actions/cache@v1
- name: Queue in release turnstile
id: turnstyle
continue-on-error: true
uses: softprops/turnstyle@v1
with:
path: ${{ steps.yarn-cache-dir.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- run: yarn
- run: yarn test --coverage
- run: yarn typecheck
abort-after-seconds: 600

- name: Create release
if: steps.turnstyle.outcome == 'success'
env:
GITHUB_TOKEN: ${{ secrets.AUTO_RELEASE_GH_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN }}
run: yarn release
30 changes: 30 additions & 0 deletions .husky/_/husky.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#!/bin/sh
if [ -z "$husky_skip_init" ]; then
debug () {
[ "$HUSKY_DEBUG" = "1" ] && echo "husky (debug) - $1"
}

readonly hook_name="$(basename "$0")"
debug "starting $hook_name..."

if [ "$HUSKY" = "0" ]; then
debug "HUSKY env variable is set to 0, skipping hook"
exit 0
fi

if [ -f ~/.huskyrc ]; then
debug "sourcing ~/.huskyrc"
. ~/.huskyrc
fi

export readonly husky_skip_init=1
sh -e "$0" "$@"
exitCode="$?"

if [ $exitCode != 0 ]; then
echo "husky - $hook_name hook exited with code $exitCode (error)"
exit $exitCode
fi

exit 0
fi
Loading

0 comments on commit 24b8fff

Please sign in to comment.