-
Notifications
You must be signed in to change notification settings - Fork 207
NODEJS-696: Migrate Travis CI to Github Action #448
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
base: master
Are you sure you want to change the base?
Changes from all commits
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,84 @@ | ||||||||
| name: Lint, TS Transpile, and Unit Tests, Migrated from Travis CI | ||||||||
|
|
||||||||
| on: | ||||||||
| push: | ||||||||
| pull_request: | ||||||||
|
|
||||||||
| jobs: | ||||||||
| eslint: | ||||||||
| name: Run eslint | ||||||||
| runs-on: ubuntu-22.04 | ||||||||
| steps: | ||||||||
| - uses: actions/checkout@v4 | ||||||||
| - uses: actions/setup-node@v4 | ||||||||
| with: | ||||||||
| node-version: 18.x | ||||||||
| cache: 'npm' | ||||||||
| - run: npm install -g eslint@4 | ||||||||
| - run: npm run eslint | ||||||||
|
|
||||||||
| typescript-49: | ||||||||
| name: TypeScript 4.9 generation and compilation tests | ||||||||
| runs-on: ubuntu-22.04 | ||||||||
| steps: | ||||||||
| - uses: actions/checkout@v4 | ||||||||
| - uses: actions/setup-node@v4 | ||||||||
| with: | ||||||||
| node-version: 18.x | ||||||||
| cache: 'npm' | ||||||||
|
|
||||||||
| - run: npm install | ||||||||
|
|
||||||||
| - run: npm install typescript@4.9.x --no-save | ||||||||
|
|
||||||||
| - run: | | ||||||||
| pushd test/unit/typescript/ | ||||||||
| npx tsc -p . | ||||||||
| node -e "require('./api-generation-test').generate()" > generated.ts | ||||||||
| npx tsc generated.ts | ||||||||
|
|
||||||||
| typescript-latest: | ||||||||
| name: TypeScript (latest) generation and compilation tests | ||||||||
| runs-on: ubuntu-22.04 | ||||||||
| steps: | ||||||||
| - uses: actions/checkout@v4 | ||||||||
| - uses: actions/setup-node@v4 | ||||||||
| with: | ||||||||
| node-version: 18.x | ||||||||
| cache: 'npm' | ||||||||
| - run: npm install | ||||||||
| - run: npm install typescript --no-save # installs the newest version | ||||||||
| - run: | | ||||||||
| pushd test/unit/typescript/ | ||||||||
| npx tsc -p . | ||||||||
| node -e "require('./api-generation-test').generate()" > generated.ts | ||||||||
| npx tsc generated.ts | ||||||||
|
|
||||||||
| unit-tests: | ||||||||
| name: Unit tests (Node.js ${{ matrix.node }}) | ||||||||
| runs-on: ubuntu-22.04 | ||||||||
| strategy: | ||||||||
| matrix: | ||||||||
| node: [18.x, 20.x, 22.x, 24.x] | ||||||||
| steps: | ||||||||
| - uses: actions/checkout@v4 | ||||||||
| - uses: actions/setup-node@v4 | ||||||||
| with: | ||||||||
| node-version: ${{ matrix.node }} | ||||||||
| cache: 'npm' | ||||||||
| - run: npm install | ||||||||
| - run: npm test | ||||||||
|
|
||||||||
|
|
||||||||
| unit-latest-deps: | ||||||||
| name: Unit tests w/ latest dependencies - Node.js 20.x | ||||||||
| runs-on: ubuntu-22.04 | ||||||||
| steps: | ||||||||
| - uses: actions/checkout@v4 | ||||||||
| - uses: actions/setup-node@v4 | ||||||||
| with: | ||||||||
| node-version: 20.x | ||||||||
|
||||||||
| node-version: 20.x | |
| node-version: 20.x | |
| cache: 'npm' |
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.
Will the next GH Action job pick up the cached latest dependencies instead of the fixed dependencies in the package-lock.json?
This file was deleted.
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.
[nitpick] Using
--no-savewithnpm installin CI is redundant since the package.json won't be committed from the CI environment. Consider removing the--no-saveflag for cleaner workflow configuration.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 just wanted to make it clear that version 4.9 overrides