Skip to content

Commit

Permalink
Merge 3e5f143 into 0cb671f
Browse files Browse the repository at this point in the history
  • Loading branch information
santino committed Jan 24, 2022
2 parents 0cb671f + 3e5f143 commit 3750d61
Show file tree
Hide file tree
Showing 6 changed files with 8,474 additions and 34,609 deletions.
114 changes: 114 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
name: CI

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
setup:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [16.x, 17.x]

steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Use Node ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- name: Cache Yarn
uses: actions/cache@v2
with:
path: '**/node_modules'
key: ${{ runner.os }}-yarn-${{ matrix.node-version }}-${{ hashFiles('yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-${{ matrix.node-version }}-
${{ runner.os }}-yarn-
${{ runner.os }}-
- name: Install dependencies
run: yarn install --ignore-engines && git checkout yarn.lock

test-and-coverage:
needs: setup
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [16.x, 17.x]

steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Use Node ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- name: Cache Yarn
uses: actions/cache@v2
with:
path: '**/node_modules'
key: ${{ runner.os }}-yarn-node-${{ matrix.node-version }}-${{ hashFiles('yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-node-${{ matrix.node-version }}-
${{ runner.os }}-yarn-node-
${{ runner.os }}-yarn-
${{ runner.os }}-
- name: Install dependencies
run: yarn install --ignore-engines && git checkout yarn.lock
- name: Run tests plus coverage
run: yarn coverage
- name: Track coverage
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.github_token }}
flag-name: run-node-${{ matrix.node-version }}
parallel: true

coveralls-finished:
needs: test-and-coverage
runs-on: ubuntu-latest
steps:
- name: Coveralls Finished
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.github_token }}
parallel-finished: true

build-plus-sizecheck:
needs: setup
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [16.x, 17.x]

steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Use Node ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- name: Cache Yarn
uses: actions/cache@v2
with:
path: '**/node_modules'
key: ${{ runner.os }}-yarn-node-${{ matrix.node-version }}-${{ hashFiles('yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-node-${{ matrix.node-version }}-
${{ runner.os }}-yarn-node-
${{ runner.os }}-yarn-
${{ runner.os }}-
- name: Install dependencies
run: yarn install --ignore-engines && git checkout yarn.lock
- name: Build package
run: yarn build
- name: Check bundle-size
env:
BUNDLEWATCH_GITHUB_TOKEN: ${{ secrets.BUNDLEWATCH_GITHUB_TOKEN }}
run: yarn bundlewatch
33 changes: 33 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Publish

on:
release:
types: [created]
pull_request: # to be removed
branches: [ main ]

jobs:
setup:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Use Node 17.x
uses: actions/setup-node@v2
with:
node-version: 17.x
- name: Install fresh dependencies
run: yarn install --ignore-engines --frozen-lockfile
- name: Run tests
run: yarn testonly
- name: Build bundle
run: yarn build
- name: Cleanup minified
run: yarn cleanupminified
- name: Copy additional 'dist' files
run: yarn copydistfiles
- name: Publish package
env:
NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
run: cd dist && npm publish --dry-run
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[![licence](https://badgen.net/github/license/santino/react-concurrent-router)](https://github.com/santino/react-concurrent-router/blob/master/LICENCE) [![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com) [![npm version](https://badgen.net/npm/v/react-concurrent-router)](https://www.npmjs.com/package/react-concurrent-router) [![Build Status](https://travis-ci.com/santino/react-concurrent-router.svg?branch=master)](https://travis-ci.com/santino/react-concurrent-router) [![Coverage Status](https://coveralls.io/repos/github/santino/react-concurrent-router/badge.svg?branch=master)](https://coveralls.io/github/santino/react-concurrent-router)
[![licence](https://badgen.net/github/license/santino/react-concurrent-router)](https://github.com/santino/react-concurrent-router/blob/master/LICENCE) [![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com) [![npm version](https://badgen.net/npm/v/react-concurrent-router)](https://www.npmjs.com/package/react-concurrent-router) [![CI](https://github.com/santino/react-concurrent-router/actions/workflows/ci.yml/badge.svg)](https://github.com/santino/react-concurrent-router/actions/workflows/ci.yml) [![Coverage Status](https://coveralls.io/repos/github/santino/react-concurrent-router/badge.svg?branch=master)](https://coveralls.io/github/santino/react-concurrent-router)

# react-concurrent-router (RCR)
Performant routing embracing React [Concurrent UI patterns](https://it.reactjs.org/docs/concurrent-mode-patterns.html)
Expand Down
Loading

0 comments on commit 3750d61

Please sign in to comment.