Skip to content

chore: add --changedSince to CI test runs on other Node.js versions #4661

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

19 changes: 18 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,24 @@ jobs:
# Added the - at the end to function as a separator to improve readability in the PR comment from the Nx cloud app
NX_CLOUD_ENV_NAME: 'Node ${{ matrix.node-version }} -'
steps:
- name: Populate base SHA in local history
uses: actions/checkout@v3
with:
fetch-depth: 1
ref: ${{ github.event.pull_request.base.sha }}

- uses: actions/checkout@v3
with:
fetch-depth: 2

- name: Print debug Git info
run: |
git remote -v
git log

- name: Pull commits after base SHA
run: git log ${{ github.event.pull_request.base.sha }}.. --pretty="%H" | xargs -n1 git pull origin

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
Expand Down Expand Up @@ -299,7 +316,7 @@ jobs:
CI: true

- name: Run unit tests for eslint-plugin
run: npx nx test @typescript-eslint/eslint-plugin
run: npx nx test @typescript-eslint/eslint-plugin --changedSince=${{ github.event.pull_request.base.sha }}
env:
CI: true

Expand Down
4 changes: 0 additions & 4 deletions packages/eslint-plugin/tests/rules/unified-signatures.test.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
import rule from '../../src/rules/unified-signatures';
import { RuleTester } from '../RuleTester';

//------------------------------------------------------------------------------
// Tests
//------------------------------------------------------------------------------

const ruleTester = new RuleTester({ parser: '@typescript-eslint/parser' });

ruleTester.run('unified-signatures', rule, {
Expand Down