Skip to content

Commit dd9cfdf

Browse files
authored
Add a CI pipeline (#23)
* Add a CI pipeline * Format code
1 parent de62b53 commit dd9cfdf

3 files changed

Lines changed: 53 additions & 14 deletions

File tree

.github/workflows/ci.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
9+
jobs:
10+
build-and-test:
11+
name: 'Build & Test'
12+
runs-on: ubuntu-latest
13+
permissions:
14+
contents: write
15+
issues: write
16+
pull-requests: write
17+
steps:
18+
- name: Checkout
19+
uses: actions/checkout@v4
20+
21+
- name: Use Node.js
22+
uses: actions/setup-node@v4
23+
with:
24+
node-version-file: .nvmrc
25+
cache: 'yarn'
26+
27+
- name: Install
28+
uses: borales/actions-yarn@v5
29+
with:
30+
cmd: install
31+
32+
- name: Check Code Format
33+
uses: borales/actions-yarn@v5
34+
with:
35+
cmd: format:check
36+
37+
- name: Lint
38+
uses: borales/actions-yarn@v5
39+
with:
40+
cmd: lint
41+
42+
- name: Build
43+
uses: borales/actions-yarn@v5
44+
with:
45+
cmd: build

README.md

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -899,9 +899,9 @@ You can show different buttons to each connection by wrapping a sub-tree in a `C
899899
You don't need to specify the button's UCID in the scope - the correct UCID will be injected automatically.
900900

901901
```tsx
902-
import {
903-
Button,
904-
ConnectionScopeProvider,
902+
import {
903+
Button,
904+
ConnectionScopeProvider,
905905
useConnectionScope,
906906
} from 'react-node-insim';
907907

@@ -956,7 +956,6 @@ function UserNameButton() {
956956
}
957957
```
958958

959-
960959
### Global scope
961960

962961
You can show the same set of buttons to all connections wrapping a sub-tree in a `GlobalScopeProvider`.
@@ -969,12 +968,7 @@ import { Button, GlobalScopeProvider } from 'react-node-insim';
969968
function App() {
970969
return (
971970
<GlobalScopeProvider>
972-
<Button
973-
top={0}
974-
left={80}
975-
height={5}
976-
width={40}
977-
>
971+
<Button top={0} left={80} height={5} width={40}>
978972
React Node InSim
979973
</Button>
980974
</GlobalScopeProvider>

examples/env.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
import dotenv from "dotenv";
2-
import fs from "fs";
3-
import path from "path";
1+
import dotenv from 'dotenv';
2+
import fs from 'fs';
3+
import path from 'path';
44

5-
const dotenvPath = path.resolve(".env");
5+
const dotenvPath = path.resolve('.env');
66

77
[`${dotenvPath}.local`, dotenvPath].forEach((dotenvFile) => {
88
if (fs.existsSync(dotenvFile)) {

0 commit comments

Comments
 (0)