@@ -10,7 +10,6 @@ permissions:
1010
1111env :
1212 FORCE_COLOR : 3
13- BCD_DIR : ./browser-compat-data
1413
1514jobs :
1615 test :
2322 # runs-on: macos-latest
2423 name : Test (${{ matrix.name }})
2524 runs-on : ${{ matrix.runs-on }}
25+ env :
26+ BCD_DIR : ./browser-compat-data
2627 steps :
2728 - name : Clone collector
2829 uses : actions/checkout@v6
5455 NODE_ENV : production
5556 - name : Upload coverage to Codecov
5657 uses : codecov/codecov-action@v5
58+
59+ diff-features :
60+ if : github.event_name == 'pull_request'
61+ name : Diff features
62+ runs-on : ubuntu-latest
63+ concurrency :
64+ group : ${{ github.workflow }}-${{ github.event.pull_request.number }}-diff-features
65+ cancel-in-progress : true
66+ steps :
67+ - name : Clone collector (base)
68+ uses : actions/checkout@v6
69+ with :
70+ ref : ${{ github.base_ref }}
71+ path : base
72+ persist-credentials : false
73+ submodules : true
74+ - name : Clone collector (PR)
75+ uses : actions/checkout@v6
76+ with :
77+ path : pr
78+ persist-credentials : false
79+ submodules : true
80+ - name : Clone browser-compat-data
81+ uses : actions/checkout@v6
82+ with :
83+ repository : mdn/browser-compat-data
84+ path : bcd
85+ persist-credentials : false
86+ - name : Setup NodeJS
87+ uses : actions/setup-node@v6
88+ with :
89+ node-version-file : pr/.nvmrc
90+ - name : Install
91+ run : |
92+ cd bcd && npm ci | sed "s/^/[bcd] /" &
93+ cd base && npm ci | sed "s/^/[base] /" &
94+ cd pr && npm ci | sed "s/^/[pr] /" &
95+ wait
96+ - name : Build tests
97+ run : |
98+ cd base && npm run build:tests | sed "s/^/[base] /" &
99+ cd pr && npm run build:tests | sed "s/^/[pr] /" &
100+ wait
101+ - name : Feature coverage
102+ run : |
103+ cd base && npm run feature-coverage -- -l > ../base-features.txt | sed "s/^/[base] /" &
104+ cd pr && npm run feature-coverage -- -l > ../pr-features.txt | sed "s/^/[pr] /" &
105+ wait
106+ env :
107+ BCD_DIR : ../bcd
108+ - name : Diff
109+ run : git diff --color=always --no-index base-features.txt pr-features.txt || true
110+
0 commit comments