Skip to content

Commit

Permalink
fixup: build test
Browse files Browse the repository at this point in the history
  • Loading branch information
soofstad committed Sep 30, 2022
1 parent fa8ba5b commit 7a77327
Show file tree
Hide file tree
Showing 26 changed files with 4,201 additions and 94 deletions.
11 changes: 8 additions & 3 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@ jobs:
steps:
- uses: actions/checkout@master

- name: Install Precommit
- name: Install pre-commit
run: pip install pre-commit

- name: Run prettier formatting
run: pre-commit run prettier --all-files

Expand All @@ -22,13 +23,17 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master

- uses: actions/setup-node@v3

# TODO: Cache yarn install

- name: "Web Tests"
- name: "Typescript test"
run: |
cd packages/${{ matrix.package }}
yarn install
yarn tsc
yarn test
HAS_TESTS=$(cat package.json | jq '.["scripts"]["test"]')
if [[ $HAS_TESTS != "null" ]]; then
yarn test
fi
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
node_modules
.idea
.vscode
.vscode
dist
15 changes: 8 additions & 7 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,11 @@ repos:
files: ^.*\.(ts|tsx|js|css|html|json)$
args: ['--config=.prettierrc.js', '--ignore-path=.prettierignore']

- repo: local
hooks:
- id: eslint
name: ESlint
entry: sh -c "npm run lint:fix"
language: system
pass_filenames: false
# TODO: Figure out formating in pre-commit
#- repo: local
# hooks:
# - id: eslint
# name: ESlint
# entry: sh -c "npm run lint:fix"
# language: system
# pass_filenames: false
11 changes: 5 additions & 6 deletions packages/blueprint/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,15 @@
"license": "MIT",
"version": "1.0.0",
"main": "src/index.tsx",
"dependencies": {
"@equinor/eds-core-react": "^0.20.0",
"@equinor/eds-icons": "^0.11.0",
"@equinor/eds-tokens": "^0.7.0"
},
"devDependencies": {
"@types/react": "^17.0.39",
"typescript": "^4.5.5",
"@development-framework/dm-core": ">=1.0.5",
"@types/styled-components": "^4.1.18"
},
"peerDependencies": {
"@development-framework/dm-core": ">=1.0.5"
"react": ">=17.0.2",
"@development-framework/dm-core": ">=1.0.5",
"styled-components": ">=5.3.6"
}
}
7 changes: 1 addition & 6 deletions packages/blueprint/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
{
"compilerOptions": {
"outDir": "dist",
"rootDir": "src"
},
"include": ["src"],
"exclude": ["node_modules", "src/**/*.spec.ts", "dist"]
"extends": "../../tsconfig.json"
}
Loading

0 comments on commit 7a77327

Please sign in to comment.