Skip to content

Combined fe and be #479

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 77 commits into from
Mar 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
77 commits
Select commit Hold shift + click to select a range
4eea1cc
fix conflict
BeyondEvil Jan 25, 2022
caca5a3
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jan 25, 2022
680fdc1
fix main.js conflicts
BeyondEvil Jan 25, 2022
7a1db7d
Merge branch 'next-gen' of github.com:BeyondEvil/pytest-html into nex…
BeyondEvil Jan 25, 2022
b780107
fix js test
BeyondEvil Jan 25, 2022
4a324b7
fix resource (main.js) test
BeyondEvil Jan 25, 2022
f84c7d4
ignore linting old main.js
BeyondEvil Jan 25, 2022
ca59818
ignore more js-files for now
BeyondEvil Jan 25, 2022
e709710
sigh
BeyondEvil Jan 25, 2022
03f7bb8
lets skip eslint for now
BeyondEvil Jan 25, 2022
be20769
Merge branch 'next-gen' of github.com:pytest-dev/pytest-html into nex…
BeyondEvil Jan 26, 2022
b4295ea
add backend
BeyondEvil Jan 15, 2022
a52a505
split nextgen class
BeyondEvil Jan 16, 2022
82358d9
fix title
BeyondEvil Jan 20, 2022
e2e3b0a
cleanup
BeyondEvil Jan 25, 2022
1616434
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jan 21, 2022
efcc888
add --next-gen flag
BeyondEvil Jan 25, 2022
0302dc2
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jan 25, 2022
ae221d9
revert change to report extra
BeyondEvil Jan 26, 2022
93fe901
ignore linting old main.js
BeyondEvil Jan 25, 2022
315c4fc
ignore more js-files for now
BeyondEvil Jan 25, 2022
e1740db
sigh
BeyondEvil Jan 25, 2022
0139f05
lets skip eslint for now
BeyondEvil Jan 25, 2022
65a8571
add backend
BeyondEvil Jan 15, 2022
b2600a7
split nextgen class
BeyondEvil Jan 16, 2022
8736ba6
fix title
BeyondEvil Jan 20, 2022
2cc756d
cleanup
BeyondEvil Jan 25, 2022
2c98fcb
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jan 21, 2022
3b14d3f
add --next-gen flag
BeyondEvil Jan 25, 2022
f79c41b
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jan 25, 2022
752a134
revert change to report extra
BeyondEvil Jan 26, 2022
137102c
Merge branch 'combined-fe-and-be' of github.com:BeyondEvil/pytest-htm…
BeyondEvil Feb 4, 2022
b47f5ce
filters style
drRedflint Feb 4, 2022
65f14cf
css and dom brush up
drRedflint Feb 27, 2022
1cf03fd
Buildable app
drRedflint Apr 17, 2022
8b034d8
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] May 8, 2022
fcf598c
always store data in html
BeyondEvil Jun 11, 2022
b18a6f7
Always store data blob in file
BeyondEvil Jun 28, 2022
d351c59
Merge pull request #3 from BeyondEvil/jim/always-store-data-blob-in-file
BeyondEvil Jun 28, 2022
7a83890
json dump test data
BeyondEvil Jun 28, 2022
d006f31
Merge pull request #4 from BeyondEvil/jim/fix-json-output
BeyondEvil Jun 28, 2022
62f236a
read data from dom element
drRedflint Jun 28, 2022
ec97147
Merge pull request #5 from drRedflint/rely_on_data_prop
BeyondEvil Jun 28, 2022
e8860c7
manually initialize state
drRedflint Jun 28, 2022
82f36ff
minimalistic dataset
drRedflint Jun 28, 2022
82f2c57
Merge pull request #6 from drRedflint/fix_unittests
BeyondEvil Jun 28, 2022
a0ce218
simplify included files
BeyondEvil Jun 28, 2022
b0738d4
Merge pull request #7 from BeyondEvil/jim/simplify-resources
BeyondEvil Jul 10, 2022
d90aad0
Handle report extras
BeyondEvil Jul 15, 2022
858bb3e
Merge pull request #8 from BeyondEvil/jim/handle-extras
BeyondEvil Jul 20, 2022
f4b427e
Handle python report hooks
BeyondEvil Jul 20, 2022
1517a9f
imgviewer
drRedflint Jul 28, 2022
8b2d7f9
present name in image viewer and open img on click
drRedflint Jul 29, 2022
401f615
moar hooks
BeyondEvil Jul 31, 2022
edd8a9f
Merge pull request #9 from BeyondEvil/jim/handle-hooks
BeyondEvil Jul 31, 2022
57f7462
Merge branch 'combined-fe-and-be' into img_viewer
BeyondEvil Jul 31, 2022
ddda951
Merge pull request #10 from drRedflint/img_viewer
BeyondEvil Aug 1, 2022
3920f67
setup linter for project
drRedflint Aug 1, 2022
60c58ed
conform to styles
drRedflint Aug 1, 2022
6e6ba32
Merge pull request #13 from drRedflint/linter
BeyondEvil Aug 2, 2022
eb43828
show video in imageviewer (#14)
drRedflint Aug 7, 2022
223bc41
Chore: Pluralize extra (#15)
BeyondEvil Aug 8, 2022
72a9710
Add extras.HTML
BeyondEvil Aug 8, 2022
e39bc15
Merge pull request #17 from BeyondEvil/extras-html
BeyondEvil Aug 9, 2022
0f6f422
Move outcome handling to backend (#18)
BeyondEvil Aug 9, 2022
8c44788
Pass in text version of longrepr if present
BeyondEvil Aug 9, 2022
a0cb25c
Merge pull request #19 from BeyondEvil/jim/fix-log-longrepr
BeyondEvil Aug 10, 2022
0c31c36
make collapse/expand all functional (#20)
drRedflint Aug 11, 2022
2ba1d00
only create links for text, url and json (#22)
BeyondEvil Sep 3, 2022
a62de0b
make filter search case insensitive (#21)
drRedflint Sep 9, 2022
fd62881
add no log output captured string
BeyondEvil Oct 25, 2022
6400ef4
Query params (#25)
drRedflint Oct 25, 2022
eff9f0d
adjust tests (#26)
drRedflint Feb 11, 2023
23fef75
Duration format (#27)
drRedflint Feb 11, 2023
a355708
Beyondevil/cleanup (#28)
BeyondEvil Mar 5, 2023
a69ec13
Fix merge conflicts
BeyondEvil Mar 5, 2023
de247c2
Fix pre-commit issues
BeyondEvil Mar 5, 2023
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
32 changes: 19 additions & 13 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,32 +1,30 @@
{
"env": {
"browser": true,
"commonjs": true,
"es2021": true
},
"extends": "eslint:recommended",
"extends": [
"google"
],
"parserOptions": {
"ecmaVersion": 12
"ecmaVersion": "latest"
},
"rules": {
"array-bracket-spacing": "error",
"block-scoped-var": "error",
"block-spacing": "error",
"brace-style": "error",
"camelcase": "error",
"camelcase": "off",
"class-methods-use-this": "error",
"consistent-return": "error",
"default-case": "error",
"default-case-last": "error",
"default-param-last": "error",
"grouped-accessor-pairs": "error",
"indent": [
"error",
4
],
"linebreak-style": [
"error",
"unix"
],
"indent": [ "error", 4 ],
"linebreak-style": [ "error", "unix" ],
"max-len": ["error", { "code": 120 }],
"no-caller": "error",
"no-console": "error",
"no-empty-function": "error",
Expand All @@ -43,17 +41,25 @@
"no-throw-literal": "error",
"no-undefined": "error",
"no-unreachable-loop": "error",
"no-unused-expressions": "error",
"no-unused-expressions": "off",
"no-useless-backreference": "error",
"no-useless-concat": "error",
"no-var": "error",
"object-curly-spacing": [
"error",
"always",
{
"arraysInObjects": true
}
],
"prefer-const": "error",
"prefer-promise-reject-errors": "error",
"require-atomic-updates": "error",
"require-await": "error",
"require-jsdoc" : 0,
"semi": [
"error",
"always"
"never"
],
"quotes": [
"error",
Expand Down
36 changes: 24 additions & 12 deletions .github/workflows/actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,34 +18,36 @@ jobs:
name: Build Docs
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
uses: actions/setup-python@v4
with:
python-version: 3.9
python-version: '3.10'
- name: Install tox
run: python -m pip install --upgrade tox
- name: Build docs with tox
run: python -m tox -e docs
run: tox -e docs

tests:
uses: ./.github/workflows/tests.yml

publish:
if: github.repository_owner == 'pytest-dev'
name: Publish to PyPI registry
needs:
- tests
runs-on: ubuntu-latest
env:
PY_COLORS: 1
TOXENV: packaging

steps:
- uses: actions/setup-python@v3
- name: Switch to using Python 3.10 by default
uses: actions/setup-python@v4
with:
python-version: 3.9
python-version: '3.10'

- name: Install tox
run: python -m pip install --user tox

- name: Check out src from Git
uses: actions/checkout@v3
with:
Expand All @@ -62,6 +64,7 @@ jobs:
) &&
1 || 0
}}

- name: Drop Git tags from HEAD for non-tag-create events
if: >-
github.event_name != 'create' ||
Expand All @@ -70,8 +73,16 @@ jobs:
git tag --points-at HEAD
|
xargs git tag --delete
- name: Build dists
run: python -m tox

- name: Build and Check Package
uses: hynek/build-and-inspect-python-package@v1

- name: Download Package
uses: actions/download-artifact@v3
with:
name: Packages
path: dist

- name: Publish to test.pypi.org
if: >-
(
Expand All @@ -84,14 +95,15 @@ jobs:
github.event_name == 'create' &&
github.event.ref_type == 'tag'
)
uses: pypa/gh-action-pypi-publish@master
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.testpypi_password }}
repository_url: https://test.pypi.org/legacy/

- name: Publish to pypi.org
if: >- # "create" workflows run separately from "push" & "pull_request"
github.event_name == 'create' &&
github.event.ref_type == 'tag'
uses: pypa/gh-action-pypi-publish@master
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.pypi_password }}
176 changes: 93 additions & 83 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,123 +5,133 @@ on:

jobs:
test_python:
name: ${{ matrix.name }}
runs-on: ${{ matrix.os }}
name: ${{ matrix.python-version }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
name: py37-ubuntu
python-version: 3.7

- os: windows-latest
name: py37-windows
python-version: 3.7
- tox-env: "py37"
python-version: "3.7"

- os: macOS-latest
name: py37-mac
python-version: 3.7
# https://github.com/pytest-dev/pytest-html/issues/585
# - os: windows-latest
# name: py37-windows
# python-version: 3.7

- os: ubuntu-latest
name: py38-ubuntu
python-version: 3.8
# https://github.com/pytest-dev/pytest-html/issues/585
# - os: macOS-latest
# name: py37-mac
# python-version: 3.7

- os: windows-latest
name: py38-windows
python-version: 3.8
- tox-env: "py38"
python-version: "3.8"

- os: macOS-latest
name: py38-mac
python-version: 3.8
# https://github.com/pytest-dev/pytest-html/issues/585
# - os: windows-latest
# name: py38-windows
# python-version: 3.8

- os: ubuntu-latest
name: py39-ubuntu
python-version: 3.9
# https://github.com/pytest-dev/pytest-html/issues/585
# - os: macOS-latest
# name: py38-mac
# python-version: 3.8

- os: windows-latest
name: py39-windows
python-version: 3.9
- tox-env: "py39"
python-version: "3.9"

- os: macOS-latest
name: py39-mac
python-version: 3.9
- tox-env: "py310"
python-version: "3.10"

- os: ubuntu-latest
name: py310-ubuntu
python-version: '3.10'
# https://github.com/pytest-dev/pytest-html/issues/585
# - os: windows-latest
# name: py39-windows
# python-version: 3.9

- os: windows-latest
name: py310-windows
python-version: '3.10'
# https://github.com/pytest-dev/pytest-html/issues/585
# - os: macOS-latest
# name: py39-mac
# python-version: 3.9

- os: macOS-latest
name: py310-mac
python-version: '3.10'
- tox-env: "pypy3"
python-version: "pypy3.9"
skip-coverage: true

- os: ubuntu-latest
name: pypy3-ubuntu
python-version: pypy-3.8

- os: windows-latest
name: pypy3-windows
python-version: pypy-3.8
# https://github.com/pytest-dev/pytest-html/issues/585
# - os: windows-latest
# name: pypy3-windows
# python-version: pypy3

# https://github.com/pytest-dev/pytest-html/issues/482
- os: macOS-latest
name: pypy3-mac
python-version: pypy-3.8
# - os: macOS-latest
# name: pypy3-mac
# python-version: pypy-3.8

- os: ubuntu-latest
name: devel-ubuntu
python-version: 3.9
- tox-env: "devel"
python-version: "3.11-dev"

steps:
- name: Set Newline Behavior
run : git config --global core.autocrlf false
run: git config --global core.autocrlf false

- uses: actions/checkout@v3

- name: Start chrome
run: ./start

- name: Use Node.js
uses: actions/setup-node@v3
with:
fetch-depth: 0
node-version: '16.x'

- name: Install Dependencies
run: npm ci

- name: Build app
run: npm run build:ci

- name: Set up Python
uses: actions/setup-python@v3
uses: actions/setup-python@v4
with:
python-version: ${{ matrix['python-version'] }}
python-version: ${{ matrix.python-version }}

- name: Install tox
run: python -m pip install --upgrade tox
- name: Get Tox Environment Name From Matrix Name
uses: rishabhgupta/split-by@v1
id: split-matrix-name
with:
string: '${{ matrix.name }}'
split-by: '-'

- name: Test with coverage
if: "! contains(matrix.name, 'pypy3')"
run: python -m tox -e ${{ steps.split-matrix-name.outputs._0}}-cov
if: ${{ ! matrix.skip-coverage }}
run: tox -e ${{ matrix.tox-env }}-cov

- name: Test without coverage
if: "contains(matrix.name, 'pypy3')"
run: python -m tox -e ${{ steps.split-matrix-name.outputs._0}}

# TODO: https://github.com/pytest-dev/pytest-html/issues/481
# - name: Upload coverage to codecov
# if: github.event.schedule == ''
# uses: codecov/codecov-action@v2
# with:
# fail_ci_if_error: true
# file: ./coverage.xml
# flags: tests
# name: ${{ matrix.py }} - ${{ matrix.os }}
# verbose: true
if: ${{ matrix.skip-coverage }}
run: tox -e ${{ matrix.tox-env }}

# TODO: https://github.com/pytest-dev/pytest-html/issues/481
- name: Upload coverage to codecov
if: >-
${{
! github.event.schedule &&
! matrix.skip-coverage &&
github.repository_owner == 'pytest-dev'
}}
uses: codecov/codecov-action@v3
with:
fail_ci_if_error: true
files: ./coverage.xml
flags: tests
name: ${{ matrix.tox-env }}
verbose: true

test_javascript:
name: grunt
name: mocha
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: '12.x'
node-version: '16.x'
- name: Install Dependencies
run: npm install
- name: QUnit Tests
run: npm test
run: npm ci
- name: Mocha Tests
run: npm run unit
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ local.properties
# JS files/folders
## node / npm
node_modules/
package-lock.json

# MacOS files
.DS_Store
Expand All @@ -51,3 +50,6 @@ Pipfile.lock

# sphinx/read the docs
docs/_build/

*.html
assets/
Loading