chore: switch from Circle CI to GH Actions (#235)
* chore: switch from Circle CI to GH Actions * docs: update readme * chore: update name
This commit is contained in:
parent
64d8830ef8
commit
5ddd83bf48
|
@ -1,70 +0,0 @@
|
|||
version: 2.1
|
||||
|
||||
supported-svelte-versions: &supported-svelte-versions ["local", "3.29.4"]
|
||||
|
||||
workflows:
|
||||
build_and_test:
|
||||
jobs:
|
||||
- build_and_test:
|
||||
matrix:
|
||||
parameters:
|
||||
svelte-version: *supported-svelte-versions
|
||||
jobs:
|
||||
build_and_test:
|
||||
parameters:
|
||||
svelte-version:
|
||||
type: string
|
||||
description: Overrides the Svelte version. `local` refers to the locally-installed version.
|
||||
default: "local"
|
||||
docker:
|
||||
- image: circleci/node:14-buster-browsers
|
||||
steps:
|
||||
- checkout
|
||||
- run:
|
||||
name: Install system dependencies
|
||||
command: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y fonts-noto-color-emoji
|
||||
- run:
|
||||
name: Check node version
|
||||
command: node -v
|
||||
- restore_cache:
|
||||
name: Restore yarn cache
|
||||
key: yarn-v1-{{ checksum "yarn.lock" }}
|
||||
- run:
|
||||
name: Yarn install
|
||||
command: yarn install --immutable
|
||||
- save_cache:
|
||||
name: Save yarn cache
|
||||
key: yarn-v1-{{ checksum "yarn.lock" }}
|
||||
paths:
|
||||
- ~/.cache/yarn
|
||||
- when:
|
||||
condition:
|
||||
equal: [ <<parameters.svelte-version>>, "local" ]
|
||||
steps:
|
||||
# there is no point in running the lint/bundlesize test for multiple versions of Svelte
|
||||
- run:
|
||||
name: Lint
|
||||
command: yarn lint
|
||||
- run:
|
||||
name: Bundlesize tests
|
||||
command: yarn benchmark:bundlesize
|
||||
- when:
|
||||
condition:
|
||||
not:
|
||||
equal: [ <<parameters.svelte-version>>, "local" ]
|
||||
steps:
|
||||
- run:
|
||||
name: Override version of svelte@<<parameters.svelte-version>>
|
||||
# Do --ignore-scripts because we don't actually want the old version of Svelte to compile
|
||||
# the picker; just get injected at runtime. This is how `emoji-picker-element/svelte` is used.
|
||||
command: yarn add svelte@<<parameters.svelte-version>> --dev --ignore-scripts
|
||||
- run:
|
||||
name: Unit tests with code coverage
|
||||
command: yarn cover
|
||||
- run:
|
||||
name: Leak tests
|
||||
command: yarn test:leak
|
||||
- store_artifacts:
|
||||
path: coverage
|
|
@ -0,0 +1,19 @@
|
|||
name: Tests
|
||||
on:
|
||||
pull_request:
|
||||
branches: [ master ]
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: '16'
|
||||
cache: 'yarn'
|
||||
- run: sudo apt-get install fonts-noto-color-emoji
|
||||
- run: yarn --immutable
|
||||
- run: yarn lint
|
||||
- run: yarn benchmark:bundlesize
|
||||
- run: yarn cover
|
||||
- run: yarn test:leak
|
|
@ -1,4 +1,4 @@
|
|||
emoji-picker-element [![Build status](https://circleci.com/gh/nolanlawson/emoji-picker-element.svg?style=svg)](https://app.circleci.com/pipelines/gh/nolanlawson/emoji-picker-element)
|
||||
emoji-picker-element
|
||||
====
|
||||
|
||||
![Screenshot of emoji-picker-element in light and dark modes](https://nolanwlawson.files.wordpress.com/2020/06/out.png)
|
||||
|
@ -779,7 +779,7 @@ import Picker from 'emoji-picker-element/svelte';
|
|||
|
||||
`svelte.js` is the same as `picker.js`, except it `import`s Svelte rather than bundling it.
|
||||
|
||||
While this option can reduce your bundle size, note that it only works if your Svelte version is compatible with `emoji-picker-element`'s Svelte version. You can check [the tests](https://github.com/nolanlawson/emoji-picker-element/blob/master/.circleci/config.yml) to see which Svelte versions are tested.
|
||||
While this option can reduce your bundle size, note that it only works if your Svelte version is compatible with `emoji-picker-element`'s Svelte version (v3 currently).
|
||||
|
||||
## Data and offline
|
||||
|
||||
|
|
Loading…
Reference in New Issue