Skip to content

Commit 4d7efcb

Browse files
authored
Run Windows on CI (emotion-js#2341)
* Run Windows on CI * try to normalize paths passed to source map generator * Configure auto EOL in git attributes * Split by path.sep in one of the tests * Revert "try to normalize paths passed to source map generator" This reverts commit 603c070.
1 parent f36b946 commit 4d7efcb

File tree

3 files changed

+26
-2
lines changed

3 files changed

+26
-2
lines changed

.circleci/config.yml

+23-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
version: 2
1+
version: 2.1
2+
3+
orbs:
4+
win: circleci/windows@2.2.0
5+
26
jobs:
37
flow:
48
docker:
@@ -46,6 +50,23 @@ jobs:
4650
- store_artifacts:
4751
path: reports/junit
4852

53+
test_windows:
54+
executor: win/default
55+
working_directory: ~/repo
56+
steps:
57+
- checkout
58+
- restore_cache:
59+
keys:
60+
- v4-dependencies-{{ checksum "yarn.lock" }}
61+
# fallback to using the latest cache if no exact match is found
62+
- v4-dependencies-
63+
- run: yarn install --pure-lockfile
64+
- run:
65+
name: Jest Tests
66+
command: yarn coverage --reporters=default --reporters=jest-junit
67+
environment:
68+
JEST_JUNIT_OUTPUT: 'reports/junit/js-test-results.xml'
69+
4970
test_dist:
5071
docker:
5172
- image: circleci/node:12
@@ -85,5 +106,6 @@ workflows:
85106
jobs:
86107
- flow
87108
- test
109+
- test_windows
88110
- test_dist
89111
- lint_and_typescript

.gitattributes

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* text=auto eol=lf

packages/babel-plugin/__tests__/css-requires-options.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// @flow
2+
import nodePath from 'path'
23
import babelTester from 'babel-tester'
34
import plugin from '@emotion/babel-plugin'
45

@@ -79,7 +80,7 @@ const cases = {
7980
{
8081
labelFormat: ({ name, path }) =>
8182
`${name.toUpperCase()}_${last(
82-
path.replace(/\..+$/, '').split('/')
83+
path.replace(/\..+$/, '').split(nodePath.sep)
8384
).toUpperCase()}`
8485
}
8586
]

0 commit comments

Comments
 (0)