postcss-bundler: add scope()
support
#5083
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: test | |
on: | |
push: | |
branches: | |
- 'main' | |
pull_request: | |
workflow_dispatch: | |
defaults: | |
run: | |
shell: bash | |
jobs: | |
test: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
# Test node 18/20/22 on ubuntu | |
# Test node 22 on macos/windows | |
# Enable annotations only for node 22 + ubuntu | |
matrix: | |
os: [ubuntu-latest] | |
node: [18, 20, 22] | |
include: | |
- os: macos-latest | |
node: 22 | |
- os: windows-latest | |
node: 22 | |
- os: ubuntu-latest | |
is_base_os_version: true | |
- node: 22 | |
is_base_node_version: true | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 1 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node }} | |
- name: npm ci | |
run: | | |
npm ci | |
if: ${{ (matrix.is_base_node_version && matrix.is_base_os_version) }} | |
- name: npm ci | |
run: | | |
NPM_CONFIG_ENGINE_STRICT=false npm ci --ignore-scripts | |
if: ${{ !(matrix.is_base_node_version && matrix.is_base_os_version) }} | |
- name: determine modified workspaces | |
run: | | |
echo "MODIFIED_WORKSPACES=$(node './.github/bin/modified-workspaces/log-modified-workspaces.mjs')" >> $GITHUB_ENV | |
env: | |
GITHUB_ACTION_PULL_REQUEST_NUMBER: ${{ github.event.pull_request.number }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
# Build and PostCSS Tape tests must all work and pass : | |
# - with exact dependencies from package-lock.json | |
# - without requiring postinstall scripts from dependencies to run | |
- name: build | |
run: | | |
npm run build --if-present $MODIFIED_WORKSPACES | |
if: matrix.is_base_node_version && matrix.is_base_os_version | |
env: | |
NODE_COMPILE_CACHE: '.cache/v8' | |
- name: repo is clean after "build", "lint" and "docs" steps | |
run: | | |
git diff --name-only --exit-code | |
# Basic tests | |
- name: test | |
run: npm run test --if-present $MODIFIED_WORKSPACES | |
env: | |
BROWSER_TESTS: ${{ (matrix.is_base_node_version && matrix.is_base_os_version) }} | |
ENABLE_ANNOTATIONS_FOR_NODE: ${{ matrix.is_base_node_version }} | |
ENABLE_ANNOTATIONS_FOR_OS: ${{ matrix.is_base_os_version }} | |
# CLI Tests | |
# running "npm install" places the cli in node_modules/bin | |
- name: test:cli | |
run: | | |
NPM_CONFIG_ENGINE_STRICT=false npm ci --ignore-scripts | |
npm run test:cli --if-present $MODIFIED_WORKSPACES | |
# E2E Tests | |
- name: test:e2e | |
run: | | |
cd e2e | |
npm install | |
npm run build | |
npm run test | |
if: matrix.is_base_node_version && matrix.is_base_os_version | |
# E2E Package Managers Tests | |
- name: test:e2e-package-managers | |
run: | | |
cd e2e-package-managers/yarn && bash test.sh | |
if: matrix.is_base_node_version && matrix.is_base_os_version |