Skip to content
This repository has been archived by the owner on Apr 22, 2022. It is now read-only.

Commit

Permalink
List companies (#15)
Browse files Browse the repository at this point in the history
* first template

* add maven release

* add maven CI

* Prepare next release 0.2-SNAPSHOT

* Add company list components

* Fix tests

* Add delete modal

* Run chromatic only on master

* add secret changes

* remove on pull request

* change condition

* add changes to gh

* change CHROMATIC_PROJECT_TOKEN

* changes

* change to steop

* change gh

* add changes to gh

* Add conditions

* Add changes to gh

* Add changes

* test

* remove chromatic

* add cypress

* Add tags

* Define tags

* visual testing

* Links

* exlude stories from coverage

* change table controls

* ADd test for company list

* change condition on visual test
  • Loading branch information
carlosthe19916 authored Dec 5, 2020
1 parent 66c0968 commit b796e4d
Show file tree
Hide file tree
Showing 76 changed files with 11,407 additions and 239 deletions.
165 changes: 78 additions & 87 deletions .github/workflows/ci-actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,37 +17,28 @@ jobs:
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 }}
- run: yarn install
- run: yarn build
- run: yarn test --coverage --watchAll=false
- uses: codecov/codecov-action@v1
with:
flags: unitests
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: yarn install
- run: yarn build
- run: yarn test --coverage --watchAll=false
- uses: codecov/codecov-action@v1
with:
flags: unitests

visual-test:
runs-on: ubuntu-latest
runs-on: ubuntu-latest
if: ${{ github.event_name != 'pull_request' && github.repository_owner == 'project-openubl' }}
steps:
- uses: actions/checkout@v1
- uses: haya14busa/action-cond@v1
id: has_chromatic_token
with:
cond: ${{ env.CHROMATIC_PROJECT_TOKEN != null }}
if_true: execute
if_false: null
env:
CHROMATIC_PROJECT_TOKEN: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
- run: yarn install
if: ${{ steps.has_chromatic_token.outputs.value != null }}
- uses: chromaui/action@v1
if: ${{ steps.has_chromatic_token.outputs.value != null }}
with:
token: ${{ secrets.GITHUB_TOKEN }}
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
- uses: actions/checkout@v1
- run: yarn install
- uses: chromaui/action@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}

e2e:
runs-on: ${{ matrix.os }}
Expand All @@ -56,66 +47,66 @@ jobs:
os: [ubuntu-latest]
browser: [chrome, firefox]
steps:
- name: Checkout
uses: actions/checkout@v2
- run: yarn install
- run: yarn build:instrumentation
- uses: haya14busa/action-cond@v1
id: define_tags
with:
cond: ${{ env.CYPRESS_RECORD_KEY != null }}
if_true: ${{ matrix.os }}-${{ matrix.browser }}
if_false: null
env:
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
- name: Cypress run
uses: cypress-io/github-action@v2
with:
record: ${{ env.CYPRESS_RECORD_KEY != null }}
tag: ${{ steps.define_tags.outputs.value }}
start: yarn run xsender:all
wait-on: 'http://localhost:3000'
wait-on-timeout: 120
config: pageLoadTimeout=100000
browser: ${{ matrix.browser }}
env:
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/upload-artifact@v1
if: failure()
with:
name: e2e-screenshots-${{ matrix.os }}-${{ matrix.browser }}
path: cypress/screenshots
- uses: actions/upload-artifact@v1
if: always()
with:
name: e2e-videos-${{ matrix.os }}-${{ matrix.browser }}
path: cypress/videos
- uses: codecov/codecov-action@v1
with:
flags: e2etests
- name: Checkout
uses: actions/checkout@v2
- run: yarn install
- run: yarn build:instrumentation
- uses: haya14busa/action-cond@v1
id: define_tags
with:
cond: ${{ env.CYPRESS_RECORD_KEY != null }}
if_true: ${{ matrix.os }}-${{ matrix.browser }}
if_false: null
env:
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
- name: Cypress run
uses: cypress-io/github-action@v2
with:
record: ${{ env.CYPRESS_RECORD_KEY != null }}
tag: ${{ steps.define_tags.outputs.value }}
start: yarn run xsender:all
wait-on: 'http://localhost:3000'
wait-on-timeout: 120
config: pageLoadTimeout=100000
browser: ${{ matrix.browser }}
env:
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/upload-artifact@v1
if: failure()
with:
name: e2e-screenshots-${{ matrix.os }}-${{ matrix.browser }}
path: cypress/screenshots
- uses: actions/upload-artifact@v1
if: always()
with:
name: e2e-videos-${{ matrix.os }}-${{ matrix.browser }}
path: cypress/videos
- uses: codecov/codecov-action@v1
with:
flags: e2etests

electron-linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: 12.x
- run: yarn install
- run: yarn run make
- name: Rename distribution
run: |
mv out/make/deb/x64/xsender*.deb xsender.amd64.deb
mv out/make/rpm/x64/xsender*.rpm xsender.x86_64.rpm
- name: Upload .deb
uses: actions/upload-artifact@v1
with:
name: xsender.amd64.deb
path: 'xsender.amd64.deb'
- name: Upload .rpm
uses: actions/upload-artifact@v1
with:
name: xsender.x86_64.rpm
path: 'xsender.x86_64.rpm'
- uses: actions/checkout@v2
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: 12.x
- run: yarn install
- run: yarn run make
- name: Rename distribution
run: |
mv out/make/deb/x64/xsender*.deb xsender.amd64.deb
mv out/make/rpm/x64/xsender*.rpm xsender.x86_64.rpm
- name: Upload .deb
uses: actions/upload-artifact@v1
with:
name: xsender.amd64.deb
path: 'xsender.amd64.deb'
- name: Upload .rpm
uses: actions/upload-artifact@v1
with:
name: xsender.x86_64.rpm
path: 'xsender.x86_64.rpm'
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@ cypress/screenshots
.idea

# Electron
/out
/out
2 changes: 1 addition & 1 deletion .storybook/theme.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ export default create({
base: 'light',
brandTitle: 'XSender Server',
brandUrl: 'https://github.com/project-openubl/xsender-server-ui',
brandImage: 'https://raw.githubusercontent.com/project-openubl/xsender-server-ui/master/public/logo.png',
brandImage: 'https://raw.githubusercontent.com/project-openubl/xsender-server-ui/master/public/logo192.png',
});

35 changes: 35 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "chrome",
"request": "launch",
"name": "Launch Chrome against localhost:3000",
"url": "http://localhost:3000",
"webRoot": "${workspaceFolder}"
},
{
"type": "chrome",
"request": "launch",
"name": "Launch Chrome against localhost:6006",
"url": "http://localhost:6006",
"webRoot": "${workspaceFolder}"
},
{
"name": "Debug CRA Tests",
"type": "node",
"request": "launch",
"runtimeExecutable": "${workspaceRoot}/node_modules/.bin/react-scripts",
"args": ["test", "--runInBand", "--no-cache", "--watchAll=false"],
"cwd": "${workspaceRoot}",
"protocol": "inspector",
"console": "integratedTerminal",
"internalConsoleOptions": "neverOpen",
"env": { "CI": "true" },
"disableOptimisticBPs": true
}
]
}
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
[![codecov](https://codecov.io/gh/project-openubl/xsender-server-ui/branch/master/graph/badge.svg)](https://codecov.io/gh/project-openubl/xsender-server-ui)
[![xsender-server-ui](https://img.shields.io/endpoint?url=https://dashboard.cypress.io/badge/simple/8fs1cv/master&style=flat&logo=cypress)](https://dashboard.cypress.io/projects/8fs1cv/runs)

# Visual testing

We use chromatic for testing our UI components. Our components are available in [Xsender Server- Chromatic](https://master-5fc93badf6736100218b69a7.chromatic.com).

# Getting Started with Create React App

This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).
Expand Down
Loading

0 comments on commit b796e4d

Please sign in to comment.