Skip to content

build(deps): bump the dev group with 3 updates (#3149) #8005

build(deps): bump the dev group with 3 updates (#3149)

build(deps): bump the dev group with 3 updates (#3149) #8005

Workflow file for this run

name: Test
on:
push:
pull_request:
permissions:
contents: read
pull-requests: read
env:
FORCE_COLOR: 3
jobs:
test:
strategy:
matrix:
include:
- name: Linux
runs-on: ubuntu-22.04
# - name: macOS
# runs-on: macos-latest
name: Test (${{ matrix.name }})
runs-on: ${{ matrix.runs-on }}
env:
BCD_DIR: ./browser-compat-data
steps:
- name: Clone collector
uses: actions/checkout@v6
with:
submodules: true
- name: Clone browser-compat-data
uses: actions/checkout@v6
with:
repository: mdn/browser-compat-data
path: browser-compat-data
- name: Setup NodeJS
uses: actions/setup-node@v6
with:
node-version-file: ".nvmrc"
- name: Prepare browser-compat-data
run: npm ci
working-directory: browser-compat-data
- run: npm ci
- run: npm run format
- run: npm run build
- run: npm run unittest
# ensure we can start the server without dev dependencies
- name: Production smoke test
run: |
npm ci --production
npm start &
npx wait-on -t 10000 -v http://localhost:8080
env:
NODE_ENV: production
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v6
diff-features:
if: github.event_name == 'pull_request'
name: Diff features
runs-on: ubuntu-latest
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}-diff-features
cancel-in-progress: true
env:
PUPPETEER_SKIP_DOWNLOAD: 1
steps:
- name: Clone collector (base)
uses: actions/checkout@v6
with:
ref: ${{ github.base_ref }}
path: base
persist-credentials: false
submodules: true
- name: Clone collector (PR)
uses: actions/checkout@v6
with:
path: pr
persist-credentials: false
submodules: true
- name: Clone browser-compat-data
uses: actions/checkout@v6
with:
repository: mdn/browser-compat-data
path: bcd
persist-credentials: false
- name: Setup NodeJS
uses: actions/setup-node@v6
with:
node-version-file: pr/.nvmrc
- name: Install
run: |
set -eo pipefail
cd bcd && npm ci | sed "s/^/[bcd] /" &
cd base && npm ci | sed "s/^/[base] /" &
cd pr && npm ci | sed "s/^/[pr] /" &
wait
- name: Build tests
run: |
set -eo pipefail
cd base && npm run build:tests | sed "s/^/[base] /" &
cd pr && npm run build:tests | sed "s/^/[pr] /" &
wait
- name: Feature coverage
run: |
set -eo pipefail
cd base && npm run feature-coverage -- -l > ../base-features.txt | sed "s/^/[base] /" &
cd pr && npm run feature-coverage -- -l > ../pr-features.txt | sed "s/^/[pr] /" &
wait
env:
BCD_DIR: ../bcd
- name: Diff
run: git diff --color=always --no-index base-features.txt pr-features.txt || true