[go: nahoru, domu]

Skip to content

Commit

Permalink
chore: add windows ci (#7695)
Browse files Browse the repository at this point in the history
* add windows ci

* review
  • Loading branch information
liuxingbaoyu committed Nov 19, 2023
1 parent 155aa1f commit 92628ae
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -151,9 +151,13 @@ jobs:
unit_tests:
name: Run Unit Tests
needs: [build]
runs-on: ubuntu-latest
runs-on: ${{ matrix.os }}
strategy:
matrix:
exclude:
- os: windows-latest
node-version: 16
os: [ubuntu-latest, windows-latest]
# just run on the oldest and latest supported versions and assume the intermediate versions are good
node-version: [16, 20]
package:
Expand Down
4 changes: 3 additions & 1 deletion packages/rule-tester/tests/RuleTester.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,9 @@ const NOOP_RULE: RuleModule<'error'> = {
};

function getTestConfigFromCall(): unknown[] {
return runRuleForItemSpy.mock.calls.map(c => c[2]);
return runRuleForItemSpy.mock.calls.map(c => {
return { ...c[2], filename: c[2].filename?.replaceAll('\\', '/') };
});
}

describe('RuleTester', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@ describe('describeFilePath', () => {
'file.ts',
'nested/file.ts',
])('filePath %s', filePath => {
expect(describeFilePath(filePath, tsconfigRootDir)).toMatchSnapshot();
expect(
describeFilePath(filePath, tsconfigRootDir).replaceAll('\\', '/'),
).toMatchSnapshot();
});
},
);
Expand Down

0 comments on commit 92628ae

Please sign in to comment.