Skip to content

⬆️ Update dev dependencies + improve CI #16

⬆️ Update dev dependencies + improve CI

⬆️ Update dev dependencies + improve CI #16

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
Build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
cache: npm
node-version-file: .node-version
- name: Install
run: npm ci
- name: CI build
run: npm run ci-build
Test:
name: Test (${{ matrix.node }} | ${{ matrix.platform.os }} | ${{ matrix.platform.shell }})
needs: Build # Verify ci-build first
strategy:
matrix:
node:
- 20.x
# - 22.x
platform:
- os: ubuntu-latest
shell: bash
# - os: macos-latest
# shell: bash
# - os: windows-latest
# shell: bash
# - os: windows-latest
# shell: pwsh
# - os: windows-latest
# shell: powershell
runs-on: ${{ matrix.platform.os }}
defaults:
run:
shell: ${{ matrix.platform.shell }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node }}
uses: actions/setup-node@v4
with:
cache: npm
node-version: ${{ matrix.node }}
- name: Run css-typed (the test)
# `cp` and `diff` should work same on bash and pwsh
# `npx --yes . --` is executing local `css-typed` as if installed
run: |
cp src/fixtures/kebab-case/kebab-case.css "$RUNNER_TEMP/kebab-case.css"
npx --yes . -- "$RUNNER_TEMP/*.css"
diff -sq src/fixtures/kebab-case/kebab-case-default.d.css.ts "$RUNNER_TEMP/kebab-case.d.css.ts"
npx --yes . -- "RUNNER_TEMP/*.css" --dashes
diff -sq src/fixtures/kebab-case/kebab-case-dashes.d.css.ts "$RUNNER_TEMP/kebab-case.d.css.ts"