Skip to content

Commit 78f988b

Browse files
committed
add some basic CI checks
1 parent 3619b74 commit 78f988b

15 files changed

+2196
-112
lines changed

.github/workflows/checks.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: test
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
11+
jobs:
12+
check:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v2
16+
- uses: actions/setup-node@v2
17+
with:
18+
node-version: 14
19+
- uses: actions/setup-python@v2
20+
with:
21+
python-version: "3.x"
22+
- run: pip install noxopt
23+
- run: nox -t check

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,7 @@ celerybeat.pid
132132
.venv
133133
env/
134134
venv/
135+
venv
135136
ENV/
136137
env.bak/
137138
venv.bak/

notebooks/introduction.ipynb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,6 @@
206206
"\n",
207207
" @use_effect\n",
208208
" def register_observer():\n",
209-
"\n",
210209
" def handle_change(change):\n",
211210
" set_value(change[\"new\"])\n",
212211
"\n",

noxfile.py

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
from noxopt import NoxOpt, Session
2+
3+
group = NoxOpt(auto_tag=True)
4+
5+
6+
@group.session
7+
def check_python(session: Session) -> None:
8+
session.install(
9+
"black[jupyter]",
10+
"flake8-pyproject",
11+
"flake8",
12+
"isort",
13+
)
14+
session.run("flake8", "reactpy_jupyter", "setup.py", "noxfile.py")
15+
session.run("black", "--check", ".")
16+
session.run("isort", "--check-only", ".")
17+
18+
19+
@group.session(python=False)
20+
def check_javascript(session: Session) -> None:
21+
session.run("npm", "ci", external=True)
22+
session.run("npm", "run", "lint", external=True)

0 commit comments

Comments
 (0)