Skip to content

Commit

Permalink
Find out why we do not have coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
lukastaegert committed Jul 8, 2022
1 parent 43ea735 commit 6e79089
Show file tree
Hide file tree
Showing 4 changed files with 94 additions and 84 deletions.
164 changes: 82 additions & 82 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,88 +11,88 @@ permissions:
contents: read

jobs:
linux18:
runs-on: ubuntu-latest
name: Node 18 + Coverage (Linux)
steps:
- name: Checkout Commit
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: '18'
- name: Install dependencies
run: npm ci --ignore-scripts
- name: Run tests with coverage
run: npm run ci:coverage
env:
CI: true
- uses: codecov/codecov-action@v1
with:
commit_parent: ${{ github.event.pull_request.head.sha }}

linux16:
runs-on: ubuntu-latest
name: Node 16 + Extra Tests (Linux)
steps:
- name: Checkout Commit
uses: actions/checkout@v3
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: '16'
- name: Install dependencies
run: npm ci --ignore-scripts
- name: Lint
run: npm run ci:lint
- name: Vulnerabilities
run: npm run security
- name: Run all tests
run: npm run ci:test
env:
CI: true

linux:
runs-on: ubuntu-latest
strategy:
matrix:
node: ['10', '12', '14']
name: Node ${{ matrix.node }} (Linux)
steps:
- name: Checkout Commit
uses: actions/checkout@v3
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
- name: Install dependencies
run: npm ci --ignore-scripts
- name: Run tests
run: npm run ci:test:only
env:
CI: true

macos:
runs-on: macos-latest
strategy:
matrix:
node: ['14', '18']
name: Node ${{ matrix.node }} (macOS)
steps:
- name: Checkout Commit
uses: actions/checkout@v3
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
- name: Install dependencies
run: npm ci --ignore-scripts
- name: Run tests
run: npm run ci:test:only
env:
CI: true
# linux18:
# runs-on: ubuntu-latest
# name: Node 18 + Coverage (Linux)
# steps:
# - name: Checkout Commit
# uses: actions/checkout@v3
# with:
# ref: ${{ github.event.pull_request.head.sha }}
# - name: Setup Node
# uses: actions/setup-node@v3
# with:
# node-version: '18'
# - name: Install dependencies
# run: npm ci --ignore-scripts
# - name: Run tests with coverage
# run: npm run ci:coverage
# env:
# CI: true
# - uses: codecov/codecov-action@v1
# with:
# commit_parent: ${{ github.event.pull_request.head.sha }}
#
# linux16:
# runs-on: ubuntu-latest
# name: Node 16 + Extra Tests (Linux)
# steps:
# - name: Checkout Commit
# uses: actions/checkout@v3
# - name: Setup Node
# uses: actions/setup-node@v3
# with:
# node-version: '16'
# - name: Install dependencies
# run: npm ci --ignore-scripts
# - name: Lint
# run: npm run ci:lint
# - name: Vulnerabilities
# run: npm run security
# - name: Run all tests
# run: npm run ci:test
# env:
# CI: true
#
# linux:
# runs-on: ubuntu-latest
# strategy:
# matrix:
# node: ['10', '12', '14']
# name: Node ${{ matrix.node }} (Linux)
# steps:
# - name: Checkout Commit
# uses: actions/checkout@v3
# - name: Setup Node
# uses: actions/setup-node@v3
# with:
# node-version: ${{ matrix.node }}
# - name: Install dependencies
# run: npm ci --ignore-scripts
# - name: Run tests
# run: npm run ci:test:only
# env:
# CI: true
#
# macos:
# runs-on: macos-latest
# strategy:
# matrix:
# node: ['14', '18']
# name: Node ${{ matrix.node }} (macOS)
# steps:
# - name: Checkout Commit
# uses: actions/checkout@v3
# - name: Setup Node
# uses: actions/setup-node@v3
# with:
# node-version: ${{ matrix.node }}
# - name: Install dependencies
# run: npm ci --ignore-scripts
# - name: Run tests
# run: npm run ci:test:only
# env:
# CI: true

windows:
runs-on: windows-latest
Expand Down
2 changes: 2 additions & 0 deletions cli/run/commandPlugins.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,13 @@ async function loadAndRegisterPlugin(
}
}
if (!plugin) {
console.log('Did not require plugin by name, trying path', pluginText)
try {
if (pluginText[0] == '.') pluginText = resolve(pluginText);
// Windows absolute paths must be specified as file:// protocol URL
else if (pluginText.match(/^[A-Za-z]:\\/)) {
pluginText = pathToFileURL(resolve(pluginText)).href;
console.log('Resolved plugin', pluginText);
}
plugin = await requireOrImport(pluginText);
} catch (err: any) {
Expand Down
6 changes: 5 additions & 1 deletion test/cli/samples/plugin/absolute-esm/_config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
const { sep } = require('path');

const command = `rollup main.js -p "${__dirname}${sep}my-esm-plugin.mjs={comment: 'Absolute ESM'}"`;
console.log('command (absolute-esm):', command);

module.exports = {
solo: true,
description: 'ESM CLI --plugin /absolute/path',
minNodeVersion: 12,
command: `rollup main.js -p "${__dirname}${sep}my-esm-plugin.mjs={comment: 'Absolute ESM'}"`
command
};
6 changes: 5 additions & 1 deletion test/cli/samples/plugin/absolute/_config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
const { sep } = require('path');

const command = `rollup main.js -p "${__dirname}${sep}my-plugin.js={VALUE: 'absolute', ZZZ: 1}"`;
console.log('command (absolute):', command);

module.exports = {
solo: true,
description: 'CLI --plugin /absolute/path',
minNodeVersion: 12,
command: `rollup main.js -p "${__dirname}${sep}my-plugin.js={VALUE: 'absolute', ZZZ: 1}"`
command
};

0 comments on commit 6e79089

Please sign in to comment.