Skip to content

Commit

Permalink
Test branch (#4)
Browse files Browse the repository at this point in the history
* fixed all broken tests

* Guoz24 patch 1 (#3)

* Create tests.yml

* Update tests.yml

* Update tests.yml

* Update tests.yml

* Update tests.yml

* Update tests.yml

* Update tests.yml

* Update tests.yml

* Update tests.yml

* deleted label prop from button in test file

* deleted a comment

* Update pull_request_template.md

* Update pull_request_template.md

Co-authored-by: Alex Guo <[email protected]>
  • Loading branch information
guoz24 and luxnova117 authored Mar 4, 2021
1 parent 75ed15b commit dab9da2
Show file tree
Hide file tree
Showing 11 changed files with 1,093 additions and 66 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions

name: Node.js CI

on:
push:
branches: [test-branch]
pull_request:
branches: '*'

jobs:
build:
runs-on: ubuntu-latest
env:
components-directory: ./components
theme-directory: ./theme

strategy:
matrix:
node-version: [10.x, 12.x, 14.x]

steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}

- name: Installing components dependencies
run: npm ci
working-directory: ${{env.components-directory}}
- name: Testing components
run: npm test
working-directory: ${{env.components-directory}}
- name: Installing theme dependencies
run: npm ci
working-directory: ${{env.theme-directory}}
- name: Testing theme
run: npm test
working-directory: ${{env.theme-directory}}

9 changes: 6 additions & 3 deletions components/jestconfig.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
{
"transform": {
"^.+\\.(t|j)sx?$": "ts-jest"
"^.+\\.(t|j)sx?$": "ts-jest"
},
"testRegex": "(/__tests__/.*|(\\.|/)(test|spec))\\.(jsx?|tsx?)$",
"moduleFileExtensions": ["ts", "tsx", "js", "jsx", "json", "node"]
}
"moduleFileExtensions": ["ts", "tsx", "js", "jsx", "json", "node"],
"moduleNameMapper": {
"^.+\\.(css|less|scss)$": "babel-jest"
}
}
Loading

0 comments on commit dab9da2

Please sign in to comment.