Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
84 changes: 84 additions & 0 deletions .github/workflows/travis-ci.yml
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
Copy link

Copilot AI Dec 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] Using --no-save with npm install in CI is redundant since the package.json won't be committed from the CI environment. Consider removing the --no-save flag for cleaner workflow configuration.

Copilot uses AI. Check for mistakes.
Copy link
Collaborator Author

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


- 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
Copy link

Copilot AI Dec 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] The unit-latest-deps job omits cache: 'npm' while all other jobs include it. For consistency and to potentially speed up the workflow by caching global npm packages, consider adding cache: 'npm' here as well, even though package-lock.json is removed afterward.

Suggested change
node-version: 20.x
node-version: 20.x
cache: 'npm'

Copilot uses AI. Check for mistakes.
Copy link
Collaborator Author

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?

- run: rm package-lock.json
- run: rm -rf node_modules
- run: npm install
- run: npm test
45 changes: 0 additions & 45 deletions .travis.yml

This file was deleted.