postcss-content-alt-text
: improve support for empty string alt text
#4925
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 14/16/18/20/22 on ubuntu | |
# Test node 20 on macos/windows | |
# Enable annotations only for node 20 + ubuntu | |
matrix: | |
os: [ubuntu-latest] | |
node: [16, 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 | |
env: | |
BROWSER_TESTS: true | |
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 | |
- name: docs | |
run: npm run docs | |
if: matrix.is_base_node_version && matrix.is_base_os_version | |
- 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: | |
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 install --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 |