File tree 3 files changed +831
-2187
lines changed
3 files changed +831
-2187
lines changed Original file line number Diff line number Diff line change 7
7
branches : [main]
8
8
9
9
jobs :
10
- build :
10
+ Build :
11
11
name : Build
12
12
runs-on : ubuntu-latest
13
13
steps :
14
14
- name : Checkout
15
15
uses : actions/checkout@v4
16
+
16
17
- name : Use Node.js
17
18
uses : actions/setup-node@v4
18
19
with :
19
20
cache : npm
20
21
node-version-file : .node-version
22
+
21
23
- name : Install
22
24
run : npm ci
25
+
23
26
- name : CI build
24
27
run : npm run ci-build
28
+
29
+ Test :
30
+ name : Test (${{ matrix.node }} | ${{ matrix.platform.os }})
31
+ needs : Build # Verify ci-build first
32
+ defaults :
33
+ run :
34
+ shell : bash
35
+ runs-on : ${{ matrix.platform.os }}
36
+ strategy :
37
+ matrix :
38
+ node :
39
+ - 20.x
40
+ - 22.x
41
+ platform :
42
+ - os : ubuntu-latest
43
+ - os : macos-latest
44
+ - os : windows-latest
45
+ fail-fast : false
46
+
47
+ steps :
48
+ - name : Checkout
49
+ uses : actions/checkout@v4
50
+
51
+ - name : Use Node.js ${{ matrix.node }}
52
+ uses : actions/setup-node@v4
53
+ with :
54
+ cache : npm
55
+ node-version : ${{ matrix.node }}
56
+
57
+ - name : Install production
58
+ run : npm ci --include prod
59
+
60
+ - name : Build production
61
+ run : npm run build
62
+
63
+ - name : Run css-typed (the test)
64
+ # `node dist/main.js` is executing local `css-typed` as if installed (same as `bin`)
65
+ # Use `-I '//.*'` to ignore the first line (comment) which has generated path and timestamp
66
+ run : |
67
+ cp src/fixtures/kebab-case/kebab-case.css "$RUNNER_TEMP/kebab-case.css"
68
+
69
+ node dist/main.js "$RUNNER_TEMP/*.css"
70
+ diff --strip-trailing-cr -uI '//.*' src/fixtures/kebab-case/kebab-case-default.d.css.ts "$RUNNER_TEMP/kebab-case.d.css.ts"
71
+
72
+ node dist/main.js "$RUNNER_TEMP/*.css" --dashes
73
+ diff --strip-trailing-cr -uI '//.*' src/fixtures/kebab-case/kebab-case-dashes.d.css.ts "$RUNNER_TEMP/kebab-case.d.css.ts"
You can’t perform that action at this time.
0 commit comments