Skip to content

Commit 3145363

Browse files
committed
test javascript in independent step
1 parent d3150a4 commit 3145363

File tree

2 files changed

+30
-15
lines changed

2 files changed

+30
-15
lines changed

.github/workflows/test.yml

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ on:
1111
- cron: "0 0 * * *"
1212

1313
jobs:
14-
test-coverage:
14+
test-python:
1515
runs-on: ubuntu-latest
1616
steps:
1717
- uses: actions/checkout@v2
@@ -27,8 +27,24 @@ jobs:
2727
run: pip install -r requirements/test-run.txt
2828
- name: Run Tests
2929
run: |
30-
nox -s test -- pytest[--headless]
31-
matrix:
30+
nox -s test_python -- pytest[--headless]
31+
test-javascript:
32+
runs-on: ubuntu-latest
33+
steps:
34+
- uses: actions/checkout@v2
35+
- uses: actions/setup-node@v2-beta
36+
with:
37+
node-version: "14"
38+
- name: Use Latest Python
39+
uses: actions/setup-python@v2
40+
with:
41+
python-version: 3.9
42+
- name: Install Python Dependencies
43+
run: pip install -r requirements/test-run.txt
44+
- name: Run Tests
45+
run: |
46+
nox -s test_javascript
47+
test-python-versions:
3248
runs-on: ${{ matrix.os }}
3349
strategy:
3450
matrix:
@@ -48,4 +64,4 @@ jobs:
4864
run: pip install -r requirements/test-run.txt
4965
- name: Run Tests
5066
run: |
51-
nox -s test -- pytest[--headless,--no-cov]
67+
nox -s test_python -- pytest[--headless,--no-cov]

noxfile.py

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -75,18 +75,17 @@ def docs_in_docker(session: Session) -> None:
7575

7676

7777
@nox.session
78-
def test(session: Session) -> None:
78+
def test_python(session: Session) -> None:
7979
"""Run the complete test suite"""
8080
session.install("--upgrade", "pip", "setuptools", "wheel")
81-
test_python(session)
82-
test_types(session)
83-
test_style(session)
84-
test_docs(session)
85-
test_js(session)
81+
test_python_suite(session)
82+
test_python_types(session)
83+
test_python_style(session)
84+
test_python_docs(session)
8685

8786

8887
@nox.session
89-
def test_python(session: Session) -> None:
88+
def test_python_suite(session: Session) -> None:
9089
"""Run the Python-based test suite"""
9190
session.env["IDOM_DEBUG_MODE"] = "1"
9291
install_requirements_file(session, "test-env")
@@ -102,7 +101,7 @@ def test_python(session: Session) -> None:
102101

103102

104103
@nox.session
105-
def test_types(session: Session) -> None:
104+
def test_python_types(session: Session) -> None:
106105
"""Perform a static type analysis of the codebase"""
107106
install_requirements_file(session, "check-types")
108107
install_requirements_file(session, "pkg-deps")
@@ -111,7 +110,7 @@ def test_types(session: Session) -> None:
111110

112111

113112
@nox.session
114-
def test_style(session: Session) -> None:
113+
def test_python_style(session: Session) -> None:
115114
"""Check that style guidelines are being followed"""
116115
install_requirements_file(session, "check-style")
117116
session.run("flake8", "src/idom", "tests", "docs")
@@ -127,7 +126,7 @@ def test_style(session: Session) -> None:
127126

128127

129128
@nox.session
130-
def test_docs(session: Session) -> None:
129+
def test_python_docs(session: Session) -> None:
131130
"""Verify that the docs build and that doctests pass"""
132131
install_requirements_file(session, "build-docs")
133132
install_idom_dev(session, extras="all")
@@ -136,7 +135,7 @@ def test_docs(session: Session) -> None:
136135

137136

138137
@nox.session
139-
def test_js(session: Session) -> None:
138+
def test_javascript(session: Session) -> None:
140139
"""Verify that the docs build and that doctests pass"""
141140
app_dir = HERE / "src" / "idom" / "client" / "app"
142141
session.chdir(str(app_dir))

0 commit comments

Comments
 (0)