Skip to content

Chore: Attach GitHub Action for CI #139

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
merged 7 commits into from
Oct 19, 2020
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
2 changes: 1 addition & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
},
"extends": "eslint:recommended",
"parserOptions": {
"ecmaVersion": 6,
"ecmaVersion": 10,
"sourceType": "module"
}
}
41 changes: 41 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: CI

on:
push:
paths-ignore:
- '*.md'
- 'LICENSE'
- 'index.d.ts'
branches:
- master
pull_request:
paths-ignore:
- '*.md'
- 'LICENSE'
- 'index.d.ts'
branches:
- master

jobs:
test:
name: Node.js v${{ matrix.nodejs }} (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
matrix:
nodejs: [10, 12, 14]
os: [ubuntu-latest, windows-latest, macOS-latest]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: ${{ matrix.nodejs }}

- name: Install
run: npm ci

- name: Linter
if: matrix.os != 'windows-latest'
run: npm run lint

- name: Test
run: npm test
4 changes: 0 additions & 4 deletions .travis.yml

This file was deleted.

4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# rollup-plugin-svelte
# rollup-plugin-svelte [![CI](https://github.com/sveltejs/rollup-plugin-svelte/workflows/CI/badge.svg)](https://github.com/sveltejs/rollup-plugin-svelte/actions)

Compile Svelte components.

Expand Down Expand Up @@ -36,7 +36,7 @@ export default {
// By default, the client-side compiler is used. You
// can also use the server-side rendering compiler
generate: 'ssr',

// ensure that extra attributes are added to head
// elements for hydration (used with generate: 'ssr')
hydratable: true,
Expand Down
30 changes: 0 additions & 30 deletions appveyor.yml

This file was deleted.

2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ class CssWriter {

// use `fileName` to prevent additional Rollup hashing
context.emitFile({ type: 'asset', fileName: mapfile, source });
}
};
}

write(dest = this.filename, map = !!this.map) {
Expand Down
11 changes: 7 additions & 4 deletions test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ const sander = require('sander');

const plugin = require('..');

// TODO(lukeed) do this within uvu?
const normalize = file => fs.readFileSync(file, 'utf8').replace(/\r?\n/g, '\n');

test('resolves using pkg.svelte', () => {
const { resolveId } = plugin();
assert.is(
Expand Down Expand Up @@ -405,8 +408,8 @@ test('bundles CSS deterministically', async () => {
});

assert.fixture(
fs.readFileSync('test/deterministic-css/dist/bundle.css', 'utf-8'),
fs.readFileSync('test/deterministic-css/expected/bundle.css', 'utf-8')
normalize('test/deterministic-css/dist/bundle.css'),
normalize('test/deterministic-css/expected/bundle.css')
);
});

Expand Down Expand Up @@ -534,8 +537,8 @@ test('handles filenames that happen to contain .svelte', async () => {
}

assert.fixture(
fs.readFileSync('test/filename-test/dist/bundle.css', 'utf-8'),
fs.readFileSync('test/filename-test/expected/bundle.css', 'utf-8')
normalize('test/filename-test/dist/bundle.css'),
normalize('test/filename-test/expected/bundle.css')
);
});

Expand Down