-
Notifications
You must be signed in to change notification settings - Fork 62
[.github] Add workflow for build+test, fix eslint #1234
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
Merged
+48
−7
Merged
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
3b40c46
[.github] Add workflow for build+test
mikeharder ef46923
add cache, fix tests
mikeharder 6e6c4dc
remove duplicate lint step
mikeharder bdf4e46
fix eslint on linux
mikeharder d5aa723
fix import order
mikeharder 69c504c
narrow import
mikeharder adeb866
only test on linux
mikeharder 957ee9d
ubuntu-latest
mikeharder 593a169
rename import
mikeharder 58ee253
increase eslint verbosity
mikeharder 55597e9
yamlDump
mikeharder bd2a503
formatting
mikeharder File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| name: Test | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - main | ||
| pull_request: | ||
| workflow_dispatch: | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| test: | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v6 | ||
|
|
||
| - name: Setup Node 20 | ||
| uses: actions/setup-node@v6 | ||
| with: | ||
| cache: "npm" | ||
| node-version: 20 | ||
|
|
||
| - name: Install deps | ||
| run: | | ||
| echo "::group::npm ci" | ||
| npm ci | ||
| echo "::endgroup::" | ||
| echo "::group::npm ls -a" | ||
| npm ls -a || true | ||
| echo "::endgroup::" | ||
| shell: bash | ||
|
|
||
| # script "build" also calls "lint" | ||
| - name: Build | ||
| run: npm run build | ||
|
|
||
| - name: Test | ||
| run: npm run test |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -103,8 +103,8 @@ | |
| "copy-templates": "copyfiles -V -E -u 1 lib/apiScenario/templates/* lib/templates/base*.mustache dist/lib", | ||
| "build": "run-p tsc lint copy-templates", | ||
| "tsc": "tsc", | ||
| "lint": "eslint ./lib/**/*.ts ./test/**/*.ts ./*.ts", | ||
| "lint-fix": "eslint ./lib/**/*.ts ./test/**/*.ts ./*.ts --fix", | ||
| "lint": "DEBUG=eslint:eslint,eslint:linter eslint \"./lib/**/*.ts\" \"./test/**/*.ts\" \"./*.ts\"", | ||
|
Member
Author
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. increase verbosity, quote args to prevent shell expansion (files were being missed) |
||
| "lint-fix": "DEBUG=eslint:eslint,eslint:linter eslint \"./lib/**/*.ts\" \"./test/**/*.ts\" \"./*.ts\" --fix", | ||
| "test": "npm run tsc && jest --ci --reporters=default --reporters=jest-junit", | ||
| "fast-test": "jest --ci --reporters=default --reporters=jest-junit --config ./jest.config.js ", | ||
| "slow-test": "node --max-old-space-size=10192 ./node_modules/.bin/jest -u --runInBand --ci --reporters=default --reporters=jest-junit --config ./regression/jest.regression.config.js ", | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,6 @@ | ||
| import * as assert from "assert"; | ||
| import * as glob from "glob"; | ||
| import * as path from "path"; | ||
| import * as glob from "glob"; | ||
|
Member
Author
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. linter error (imports must be sorted) |
||
| import { DefaultConfig } from "../lib/util/constants"; | ||
| import { RequestResponsePair, LiveValidator } from "../lib/liveValidation/liveValidator"; | ||
|
|
||
|
|
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
narrow import to fix lint error