Skip to content

enable full CI #27

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .github/bin/install-and-test-all-packages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,27 +4,27 @@ set -e

start_dir=$(pwd)

for package in $(ls -d ./packages); do
for package in $(ls -d ./packages/*); do
echo "Installing and testing $package"
cd $package
npm install --ignore-scripts
npm test
npm run test
cd $start_dir
done


for package in $(ls -d ./plugins); do
for package in $(ls -d ./plugins/*); do
echo "Installing and testing $package"
cd $package
npm install --ignore-scripts
npm test
npm run test
cd $start_dir
done

for package in $(ls -d ./plugin-packs); do
for package in $(ls -d ./plugin-packs/*); do
echo "Installing and testing $package"
cd $package
npm install --ignore-scripts
npm test
npm run test
cd $start_dir
done
22 changes: 22 additions & 0 deletions .github/workflows/test-node-without-workspaces.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: test node without workspaces
on:
push:

jobs:
test_without_workspaces_support:
runs-on: ubuntu-latest
strategy:
matrix:
node: [12, 14]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 16
- run: npm install --ignore-scripts
- run: npm run build --workspaces --if-present

- uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node }}
- run: bash ./.github/bin/install-and-test-all-packages.sh
54 changes: 26 additions & 28 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,52 +14,50 @@ jobs:
with:
node-version: ${{ matrix.node }}

- run: exit 0
# - run: npm install --ignore-scripts
# - run: npm run build --workspaces --if-present
# - run: npm run lint --workspaces --if-present
# - run: npm run test --workspaces --if-present
- run: npm install --ignore-scripts
- run: npm run build --workspaces --if-present
- run: npm run lint --workspaces --if-present
- run: npm run test --workspaces --if-present

test_without_workspaces_support:
runs-on: ubuntu-latest
# Run cross platform test of the basic CLI.
test_cli:
runs-on: ${{ matrix.os }}
strategy:
matrix:
node: [12, 14]
os: ['ubuntu-latest', 'macos-latest', 'windows-latest']
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 16

- run: exit 0
# - run: npm install --ignore-scripts
# - run: npm run build --workspaces --if-present
- run: npm install --ignore-scripts
- run: npm run build --workspaces --if-present

- uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node }}
# running "npm install" places the cli in node_modules/bin
- run: npm install --ignore-scripts

- run: exit 0
# - run: bash ./.github/bin/install-and-test-all-packages.sh
- run: |
npm run test --workspace="@csstools/base-cli"
npm run test:cli --workspace="@csstools/postcss-base-plugin"

# Run cross platform test of the basic CLI.
test_cli:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: ['ubuntu-latest', 'macos-latest', 'windows-latest']
# Run Deno tests one by one
test_deno:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 16

- run: npm install --ignore-scripts
# - run: npm run build --workspaces --if-present
- run: npm run build --workspaces --if-present

- uses: denoland/setup-deno@v1
with:
deno-version: v1.x.x

# Per plugin from here
- run: |
npm run build --workspace="@csstools/base-cli" --workspace="@csstools/postcss-base-plugin"
# running install places the cli in node_modules/bin
npm install
npm run test --workspace="@csstools/base-cli"
npm run test:cli --workspace="@csstools/postcss-base-plugin"
cd plugins/postcss-nesting
npm run test:deno
6 changes: 3 additions & 3 deletions plugin-packs/postcss-preset-env/.tape.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ module.exports = {
},
insertBefore: {
'color-mod-function': [
require('postcss-simple-vars')
require('postcss-simple-vars')()
]
}
}
Expand All @@ -93,7 +93,7 @@ module.exports = {
options: {
stage: 1,
insertAfter: {
'color-mod-function': require('postcss-simple-vars')
'color-mod-function': require('postcss-simple-vars')()
}
},
},
Expand All @@ -113,7 +113,7 @@ module.exports = {
stage: 1,
insertAfter: {
'color-mod-function': [
require('postcss-simple-vars')
require('postcss-simple-vars')()
]
},
features: {
Expand Down
5 changes: 3 additions & 2 deletions plugin-packs/postcss-preset-env/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"scripts": {
"prepublishOnly": "npm run build && npm run test",
"lint": "eslint src/**/*.js",
"test": "postcss-tape",
"test": "postcss-tape --ci",
"build": "rollup -c ../../rollup/default.js",
"stryker": "stryker run --logLevel error"
},
Expand Down Expand Up @@ -65,7 +65,8 @@
},
"devDependencies": {
"postcss": "^8.3.6",
"postcss-tape": "^6.0.1"
"postcss-tape": "^6.0.1",
"postcss-simple-vars": "^6.0.3"
},
"peerDependencies": {
"postcss": "^8.3"
Expand Down
16 changes: 10 additions & 6 deletions plugin-packs/postcss-preset-env/test/basic.autoprefixer.expect.css
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,22 @@

.test-image-set-function {
background-image: url(img/test.png);
background-image: image-set(url(img/test.png) 1x, url(img/test-2x.png) 2x);
order: 2;
}

@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
@media (-webkit-min-device-pixel-ratio: 1), (min-resolution: 96dpi) {

.test-image-set-function {
background-image: url(img/test-2x.png);
background-image: url(img/test.png);
}
}

@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {

.test-image-set-function {
background-image: image-set(url(img/test.png) 1x, url(img/test-2x.png) 2x);
order: 2;
background-image: url(img/test-2x.png);
}
}

[dir="ltr"] .test-logical-properties-and-values {
Expand Down Expand Up @@ -97,8 +101,8 @@
}

.test-lab-function {
background-color: rgb(178, 34, 34);
color: rgba(178, 34, 34, 0.5);
background-color: rgb(179, 35, 35);
color: rgba(179, 34, 35, 0.5);
order: 14;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,22 @@

.test-image-set-function {
background-image: url(img/test.png);
background-image: image-set(url(img/test.png) 1x, url(img/test-2x.png) 2x);
order: 2;
}

@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
@media (-webkit-min-device-pixel-ratio: 1), (min-resolution: 96dpi) {

.test-image-set-function {
background-image: url(img/test-2x.png);
background-image: url(img/test.png);
}
}

@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {

.test-image-set-function {
background-image: image-set(url(img/test.png) 1x, url(img/test-2x.png) 2x);
order: 2;
background-image: url(img/test-2x.png);
}
}

[dir="ltr"] .test-logical-properties-and-values {
Expand Down Expand Up @@ -97,8 +101,8 @@
}

.test-lab-function {
background-color: rgb(178, 34, 34);
color: rgba(178, 34, 34, 0.5);
background-color: rgb(179, 35, 35);
color: rgba(179, 34, 35, 0.5);
order: 14;
}

Expand Down
18 changes: 11 additions & 7 deletions plugin-packs/postcss-preset-env/test/basic.ch38.expect.css
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,23 @@

.test-image-set-function {
background-image: url(img/test.png);
background-image: -webkit-image-set(url(img/test.png) 1x, url(img/test-2x.png) 2x);
background-image: image-set(url(img/test.png) 1x, url(img/test-2x.png) 2x);
order: 2;
}

@media (min-resolution: 192dpi) {
@media (min-resolution: 96dpi) {

.test-image-set-function {
background-image: url(img/test-2x.png);
background-image: url(img/test.png);
}
}

@media (min-resolution: 192dpi) {

.test-image-set-function {
background-image: -webkit-image-set(url(img/test.png) 1x, url(img/test-2x.png) 2x);
background-image: image-set(url(img/test.png) 1x, url(img/test-2x.png) 2x);
order: 2;
background-image: url(img/test-2x.png);
}
}

[dir="ltr"] .test-logical-properties-and-values {
Expand Down Expand Up @@ -98,8 +102,8 @@
}

.test-lab-function {
background-color: rgb(178, 34, 34);
color: rgba(178, 34, 34, 0.5);
background-color: rgb(179, 35, 35);
color: rgba(179, 34, 35, 0.5);
order: 14;
}

Expand Down
18 changes: 11 additions & 7 deletions plugin-packs/postcss-preset-env/test/basic.expect.css
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,23 @@

.test-image-set-function {
background-image: url(img/test.png);
background-image: -webkit-image-set(url(img/test.png) 1x, url(img/test-2x.png) 2x);
background-image: image-set(url(img/test.png) 1x, url(img/test-2x.png) 2x);
order: 2;
}

@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
@media (-webkit-min-device-pixel-ratio: 1), (min-resolution: 96dpi) {

.test-image-set-function {
background-image: url(img/test-2x.png);
background-image: url(img/test.png);
}
}

@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {

.test-image-set-function {
background-image: -webkit-image-set(url(img/test.png) 1x, url(img/test-2x.png) 2x);
background-image: image-set(url(img/test.png) 1x, url(img/test-2x.png) 2x);
order: 2;
background-image: url(img/test-2x.png);
}
}

[dir="ltr"] .test-logical-properties-and-values {
Expand Down Expand Up @@ -98,8 +102,8 @@
}

.test-lab-function {
background-color: rgb(178, 34, 34);
color: rgba(178, 34, 34, 0.5);
background-color: rgb(179, 35, 35);
color: rgba(179, 34, 35, 0.5);
order: 14;
}

Expand Down
16 changes: 10 additions & 6 deletions plugin-packs/postcss-preset-env/test/basic.ff49.expect.css
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,22 @@

.test-image-set-function {
background-image: url(img/test.png);
background-image: image-set(url(img/test.png) 1x, url(img/test-2x.png) 2x);
order: 2;
}

@media (min-resolution: 192dpi) {
@media (min-resolution: 96dpi) {

.test-image-set-function {
background-image: url(img/test-2x.png);
background-image: url(img/test.png);
}
}

@media (min-resolution: 192dpi) {

.test-image-set-function {
background-image: image-set(url(img/test.png) 1x, url(img/test-2x.png) 2x);
order: 2;
background-image: url(img/test-2x.png);
}
}

.test-logical-properties-and-values {
Expand Down Expand Up @@ -88,8 +92,8 @@
}

.test-lab-function {
background-color: rgb(178, 34, 34);
color: rgba(178, 34, 34, 0.5);
background-color: rgb(179, 35, 35);
color: rgba(179, 34, 35, 0.5);
order: 14;
}

Expand Down
Loading