Skip to content

Commit

Permalink
v0.0.8 (#9)
Browse files Browse the repository at this point in the history
* Add unit test artifacts

* Add tests for Box and Icon

* WIP add gha action for unit test

* Fix gha for jest test

* Fix npm run invoke

* Refactor test gha

* Add selenium setup

* Fix integration test

* Skip ci when ci-skip is in commit message

* Add Button integration test

* Fix integration test for Button

* Fix missing start_app

* Cache py dependencies

* Test cached py deps

* Fix venv activation for pytest

* Update package

* Add build job to GHA

* Fix build job

* Activate venv to build the package

* Install virtualenv

* Fix build package

* Add workflow to deploy docs

* Fix docs publish job
  • Loading branch information
jlfsjunior committed Jul 22, 2021
1 parent 1862ddc commit c671aaf
Show file tree
Hide file tree
Showing 28 changed files with 6,769 additions and 2,888 deletions.
70 changes: 70 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
name: Tests

on:
push:
branches: [ master, 'feat/**', 'feature/**' ]

jobs:
build:
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, 'ci-skip')"
steps:
- uses: actions/checkout@v2
- name: Set up node
uses: actions/setup-node@v2
with:
node-version: "10"
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Install python libraries
run: |
pip install virtualenv
virtualenv venv
source venv/bin/activate
pip install -r requirements.txt
- name: Install node dependencies
run: |
npm install
- name: Build package
run: |
source venv/bin/activate && npm run build
test-unit:
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v2
- name: Set up node
uses: actions/setup-node@v2
with:
node-version: "10"
- name: Instal node dependencies
run: |
npm install
- name: Run Jest
run: |
npm run test:unit
test-integration:
runs-on: ubuntu-latest
needs: test-unit
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Set up Selenium
uses: nanasess/setup-chromedriver@v1.0.5
- uses: actions/cache@v2
with:
path: ${{ env.pythonLocation }}
key: ${{ env.pythonLocation }}-${{ hashFiles('setup.py') }}-${{ hashFiles('tests/requirements.txt') }}
- name: Install test dependencies
run: |
python -m pip install --upgrade pip
pip install -r tests/requirements.txt
- name: Run tests
run: pytest --headless

3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -277,4 +277,5 @@ GitHub.sublime-settings
# docs
docs/

.vscode
.vscode
.devcontainer
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: dashChakrauiComponents
Title: Chakra UI components for Dash
Version: 0.0.7
Version: 0.0.8
Description: Chakra UI components for Dash
Depends: R (>= 3.0.2)
Imports:
Expand Down
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "DashChakrauiComponents"
uuid = "1b08a953-4be3-4667-9a23-d8cb249726ec"
authors = ["José Luiz Ferreira <jlfsjunior@gmail.com>"]
version = "0.0.7"
version = "0.0.8"

[deps]
Dash = "1b08a953-4be3-4667-9a23-3db579824955"
Expand Down
4 changes: 2 additions & 2 deletions R/internal.R
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
.dashChakrauiComponents_js_metadata <- function() {
deps_metadata <- list(`dash_chakraui_components` = structure(list(name = "dash_chakraui_components",
version = "0.0.7", src = list(href = NULL,
version = "0.0.8", src = list(href = NULL,
file = "deps"), meta = NULL,
script = 'dash_chakraui_components.min.js',
stylesheet = NULL, head = NULL, attachment = NULL, package = "dashChakrauiComponents",
all_files = FALSE), class = "html_dependency"),
`dash_chakraui_components` = structure(list(name = "dash_chakraui_components",
version = "0.0.7", src = list(href = NULL,
version = "0.0.8", src = list(href = NULL,
file = "deps"), meta = NULL,
script = 'dash_chakraui_components.min.js.map',
stylesheet = NULL, head = NULL, attachment = NULL, package = "dashChakrauiComponents",
Expand Down
10 changes: 5 additions & 5 deletions dash_chakraui_components/dash_chakraui_components.min.js

Large diffs are not rendered by default.

Large diffs are not rendered by default.

10 changes: 8 additions & 2 deletions dash_chakraui_components/package-info.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "dash_chakraui_components",
"version": "0.0.7",
"version": "0.0.8",
"description": "Chakra UI components for Dash",
"main": "build/index.js",
"scripts": {
Expand All @@ -11,7 +11,10 @@
"build:backends": "dash-generate-components ./src/lib/components dash_chakraui_components -p package-info.json --r-prefix '' --jl-prefix ''",
"build:backends-activated": "(. venv/bin/activate || venv\\scripts\\activate && npm run build:py_and_r)",
"build": "npm run build:js && npm run build:backends",
"build:activated": "npm run build:js && npm run build:backends-activated"
"build:activated": "npm run build:js && npm run build:backends-activated",
"test:unit": "jest",
"test:integration": "source ./tests/venv-test/bin/activate && pytest",
"test": "npm run test:unit && npm run test:integration"
},
"author": "José Luiz Ferreira <jlfsjunior@gmail.com>",
"license": "MIT",
Expand All @@ -37,10 +40,13 @@
"babel-loader": "^8.0.6",
"copyfiles": "^2.1.1",
"css-loader": "^3.0.0",
"enzyme": "^3.11.0",
"enzyme-adapter-react-16": "^1.15.6",
"eslint": "^6.0.1",
"eslint-config-prettier": "^6.0.0",
"eslint-plugin-import": "^2.18.0",
"eslint-plugin-react": "^7.14.2",
"jest": "^27.0.4",
"npm": "^6.14.12",
"prop-types": "^15.7.2",
"react": "^16.8.6",
Expand Down
10 changes: 5 additions & 5 deletions deps/dash_chakraui_components.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion deps/dash_chakraui_components.min.js.map

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions inst/deps/dash_chakraui_components.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion inst/deps/dash_chakraui_components.min.js.map

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module.exports = {
setupFilesAfterEnv: [
'./tests/unit/jestSetup.js'
]
}
Loading

0 comments on commit c671aaf

Please sign in to comment.