Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 9 additions & 25 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Run Tests & Linters
name: CI

on:
push:
Expand All @@ -9,31 +9,15 @@ on:
jobs:
build:
runs-on: ubuntu-latest

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

steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
version: 8
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
version: 9
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
node-version: 20
cache: pnpm
- name: Install Dependencies
run: |
pnpm install
- name: Lint Sources with ESLint
run: npm run lint
- name: Run Test
run: npm test && npm run coverage
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
files: ./coverage/coverage.txt
- run: pnpm install
- run: pnpm lint
- run: pnpm test
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,3 +77,18 @@ See [demos](/demos/) for a complete example.
## Documentation

[API](https://native-router.github.io/react/modules.html)

import { Router } from '@native-router/react';

const routes = [
{
path: '/admin',
children: [...]
}
];

function App() {
return <Router routes={routes} />;
}
```

Loading