-
Notifications
You must be signed in to change notification settings - Fork 25
Refactor of ExpressJS files #174
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
3d709b6
44b97c4
33c71ff
4c1f231
b589964
7d3ccd7
9a10bb1
318dad2
91be24f
f628571
e8ec339
6f58215
d829feb
7ea530c
35d3c67
aec0c8f
2de3762
e0b7301
a555448
1335f79
f785b7a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
name: lint | ||
on: | ||
push: | ||
branches: | ||
- master | ||
- dev | ||
tags: | ||
- v* | ||
pull_request: | ||
branches: | ||
- dev | ||
- master | ||
|
||
jobs: | ||
test: | ||
runs-on: "ubuntu-latest" | ||
timeout-minutes: 10 | ||
strategy: | ||
matrix: | ||
node-version: [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: Install dependencies | ||
run: npm install | ||
|
||
# This file is required by most controllers and triggers "import/no-unresolved" if missing | ||
- name: Copy config file | ||
run: cp ./__tests__/integration/configuration/config-fixture.js ./src/config.js | ||
|
||
- name: Lint | ||
run: npm run lint | ||
Comment on lines
+31
to
+36
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why not just add these steps before testing on the main workflow? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Since our tests are currently not green, I tried to create the minimum possible interference with them. So I created a new workflow yml. But now that you mention, I see our wallet mobile follows this practice of running the lint within the I agree that's a good idea, but I would rather make all tests green before making this move. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think the interference caused by linters is not that big. We will be able to differentiate failures caused by them or by the tests. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I tried adding the linter to the main workflow on a555448, but it broke when tried to run on Node 8.x, possibly also on 10.x We could use additional actions or configurations to enable the linting only on specific node versions, but I think there is little benefit for this extra complexity. Do you have any suggestions on this? |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,19 @@ | ||
const config = { | ||
http_bind_address: "fakehost", | ||
http_bind_address: 'fakehost', | ||
http_port: 8001, | ||
network: "testnet", | ||
server: "http://fakehost:8083/v1a/", | ||
network: 'testnet', | ||
server: 'http://fakehost:8083/v1a/', | ||
seeds: { | ||
stub_seed: | ||
"upon tennis increase embark dismiss diamond monitor face magnet jungle scout salute rural master shoulder cry juice jeans radar present close meat antenna mind", | ||
'upon tennis increase embark dismiss diamond monitor face magnet jungle scout salute rural master shoulder cry juice jeans radar present close meat antenna mind', | ||
}, | ||
multisig: {}, | ||
tokenUid: "", | ||
tokenUid: '', | ||
gapLimit: null, | ||
confirmFirstAddress: null, | ||
}; | ||
|
||
// Allow change config at runtime | ||
global.config = config; | ||
|
||
export default config; | ||
export default config; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unrelated to line
What's your opinion on running the integration tests after unit tests (on the main workflow)?
If the unit tests fail we don't need to run integration.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like the idea of only running the integration tests after the unit ones, but maybe not on the same workflow.
Both tests have a timeout of 40 minutes and generate great amounts of logs. While we're trying to fine tune them, I think it's more helpful to keep them on isolated runs with separate outputs. The cost benefit may not be a relevant trade-off for the isolation of problems while in active development.
I think that with some optimizations on the headless, the tests and the underlying lib we could join those tests in the future. But while we don't get to that point, maybe other solutions like the wait on check action or the
workflow_run
property could be good alternatives to this ordering of actions.What do you think?