chore(build): fix github actions (#44)
* Add nvmrc to app * Add nvmrc to api * Remove unused test in app * Fix broken test in site * chore: use yarn instead of npm * chore: setup lerna to use yarn * chore(build): use yarn in workflows * chore(build): skip lerna install and run using npx
This commit is contained in:
parent
1e45d283ab
commit
d8f106f60f
|
@ -16,11 +16,9 @@ jobs:
|
|||
uses: actions/setup-node@v1
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
npm i -g lerna
|
||||
lerna bootstrap
|
||||
run: npx lerna bootstrap
|
||||
|
||||
- name: Run tests
|
||||
run: npm test
|
||||
run: yarn test
|
||||
env:
|
||||
CI: true
|
||||
|
|
|
@ -17,11 +17,9 @@ jobs:
|
|||
uses: actions/setup-node@v1
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
npm i -g lerna
|
||||
lerna bootstrap
|
||||
run: npx lerna bootstrap
|
||||
|
||||
- name: Run tests
|
||||
run: npm test
|
||||
run: yarn test
|
||||
env:
|
||||
CI: true
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"packages": [
|
||||
"packages/*"
|
||||
],
|
||||
"packages": ["packages/*"],
|
||||
"npmClient": "yarn",
|
||||
"useWorkspaces": true,
|
||||
"version": "0.0.0"
|
||||
}
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -6,5 +6,8 @@
|
|||
},
|
||||
"scripts": {
|
||||
"test": "lerna run test --stream"
|
||||
}
|
||||
},
|
||||
"workspaces": [
|
||||
"packages/*"
|
||||
]
|
||||
}
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
v14.15.0
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1 @@
|
|||
v14.15.4
|
|
@ -1,14 +0,0 @@
|
|||
/**
|
||||
* @format
|
||||
*/
|
||||
|
||||
import 'react-native'
|
||||
import React from 'react'
|
||||
import App from '../App'
|
||||
|
||||
// Note: test renderer must be required after react-native.
|
||||
import renderer from 'react-test-renderer'
|
||||
|
||||
it('renders correctly', () => {
|
||||
renderer.create(<App />)
|
||||
})
|
|
@ -7,7 +7,7 @@
|
|||
"ios": "react-native-fix-image && react-native run-ios",
|
||||
"pod": "npx pod-install",
|
||||
"start": "react-native start",
|
||||
"test": "jest",
|
||||
"test": "jest --passWithNoTests",
|
||||
"lint": "eslint ."
|
||||
},
|
||||
"dependencies": {
|
||||
|
|
|
@ -2,6 +2,12 @@ import React from 'react'
|
|||
import { render, screen, fireEvent } from '@testing-library/react'
|
||||
import Header from '../Header'
|
||||
|
||||
jest.mock('next/router', () => ({
|
||||
useRouter: jest.fn().mockReturnValue({
|
||||
pathname: '',
|
||||
}),
|
||||
}))
|
||||
|
||||
const setup = (customProps = {}) => {
|
||||
const props = {
|
||||
...customProps,
|
||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue