Skip to content

Commit

Permalink
migrate from circle-ci to github actions for tests (#466)
Browse files Browse the repository at this point in the history
  • Loading branch information
davidhu2000 committed May 3, 2022
1 parent 5e23db4 commit f413968
Show file tree
Hide file tree
Showing 28 changed files with 376 additions and 466 deletions.
29 changes: 0 additions & 29 deletions .circleci/config.yml

This file was deleted.

89 changes: 89 additions & 0 deletions .github/workflows/tests.yml
@@ -0,0 +1,89 @@
name: tests

on:
push:
branches: [master]
pull_request:
branches: [master]

jobs:
tests:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16.x
cache: "npm"
- run: npm install --global yarn

- uses: actions/cache@v3
id: yarn-cache
with:
path: node_modules
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- run: yarn install
if: steps.yarn-cache.outputs.cache-hit != 'true'
- run: yarn run clean
- run: yarn run test
- name: Coveralls
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
lint:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16.x
cache: "npm"
- run: npm install --global yarn

- uses: actions/cache@v3
id: yarn-cache
with:
path: node_modules
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- run: yarn install
if: steps.yarn-cache.outputs.cache-hit != 'true'
- run: yarn run clean
- run: yarn run lint

demo-site:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16.x
cache: "npm"
- run: npm install --global yarn

- uses: actions/cache@v3
id: yarn-cache
with:
path: node_modules
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- run: yarn install
if: steps.yarn-cache.outputs.cache-hit != 'true'
- run: yarn run clean
- run: yarn run build:demo
- name: check if there are changes
id: changes
uses: UnicornGlobal/has-changes-action@v1.0.11
- name: error has changes
if: steps.changes.outputs.changed == 1
run: echo "Commit docs changes by running yarn run build:demo"
20 changes: 8 additions & 12 deletions __tests__/__snapshots__/BarLoader-tests.tsx.snap
Expand Up @@ -35,7 +35,7 @@ exports[`BarLoader common specs should match snapshot 1`] = `
}
}
.emotion-018btcsr {
.emotion-0 {
position: relative;
width: 100px;
height: 4px;
Expand All @@ -45,7 +45,7 @@ exports[`BarLoader common specs should match snapshot 1`] = `
background-clip: padding-box;
}
.emotion-09u87m4 {
.emotion-1 {
position: absolute;
height: 4px;
overflow: hidden;
Expand All @@ -61,7 +61,7 @@ exports[`BarLoader common specs should match snapshot 1`] = `
animation: animation-0 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite;
}
.emotion-05pouuy {
.emotion-2 {
position: absolute;
height: 4px;
overflow: hidden;
Expand Down Expand Up @@ -89,15 +89,11 @@ exports[`BarLoader common specs should match snapshot 1`] = `
className="emotion-0"
>
<span
className="emotion-018btcsr"
>
<span
className="emotion-09u87m4"
/>
<span
className="emotion-05pouuy"
/>
</span>
className="emotion-1"
/>
<span
className="emotion-2"
/>
</span>
</Loader>
`;
24 changes: 10 additions & 14 deletions __tests__/__snapshots__/BeatLoader-tests.tsx.snap
Expand Up @@ -37,7 +37,7 @@ exports[`BeatLoader common specs should match snapshot 1`] = `
}
}
.emotion-0110do72 {
.emotion-1 {
display: inline-block;
background-color: #000000;
width: 15px;
Expand All @@ -50,7 +50,7 @@ exports[`BeatLoader common specs should match snapshot 1`] = `
animation-fill-mode: both;
}
.emotion-01by9rry {
.emotion-2 {
display: inline-block;
background-color: #000000;
width: 15px;
Expand All @@ -75,18 +75,14 @@ exports[`BeatLoader common specs should match snapshot 1`] = `
className="emotion-0"
>
<span
className="emotion-01xdhyk6"
>
<span
className="emotion-0110do72"
/>
<span
className="emotion-01by9rry"
/>
<span
className="emotion-0110do72"
/>
</span>
className="emotion-1"
/>
<span
className="emotion-2"
/>
<span
className="emotion-1"
/>
</span>
</Loader>
`;
20 changes: 8 additions & 12 deletions __tests__/__snapshots__/BounceLoader-tests.tsx.snap
Expand Up @@ -33,13 +33,13 @@ exports[`BounceLoader common specs should match snapshot 1`] = `
}
}
.emotion-0mz0q36 {
.emotion-0 {
position: relative;
width: 60px;
height: 60px;
}
.emotion-014hgwh {
.emotion-1 {
position: absolute;
height: 60px;
width: 60px;
Expand All @@ -54,7 +54,7 @@ exports[`BounceLoader common specs should match snapshot 1`] = `
animation: animation-0 2.1s 1s infinite ease-in-out;
}
.emotion-01fymig2 {
.emotion-2 {
position: absolute;
height: 60px;
width: 60px;
Expand All @@ -80,15 +80,11 @@ exports[`BounceLoader common specs should match snapshot 1`] = `
className="emotion-0"
>
<span
className="emotion-0mz0q36"
>
<span
className="emotion-014hgwh"
/>
<span
className="emotion-01fymig2"
/>
</span>
className="emotion-1"
/>
<span
className="emotion-2"
/>
</span>
</Loader>
`;
44 changes: 20 additions & 24 deletions __tests__/__snapshots__/CircleLoader-tests.tsx.snap
Expand Up @@ -116,13 +116,13 @@ exports[`CircleLoader common specs should match snapshot 1`] = `
}
}
.emotion-0yrmx0p {
.emotion-0 {
position: relative;
width: 50px;
height: 50px;
}
.emotion-018jumju {
.emotion-1 {
position: absolute;
height: 50px;
width: 50px;
Expand All @@ -140,7 +140,7 @@ exports[`CircleLoader common specs should match snapshot 1`] = `
animation: animation-0 1s 0s infinite linear;
}
.emotion-01ix8i79 {
.emotion-2 {
position: absolute;
height: 45px;
width: 45px;
Expand All @@ -158,7 +158,7 @@ exports[`CircleLoader common specs should match snapshot 1`] = `
animation: animation-0 1s 0.2s infinite linear;
}
.emotion-0mdd9ud {
.emotion-3 {
position: absolute;
height: 40px;
width: 40px;
Expand All @@ -176,7 +176,7 @@ exports[`CircleLoader common specs should match snapshot 1`] = `
animation: animation-0 1s 0.4s infinite linear;
}
.emotion-0qbu4to {
.emotion-4 {
position: absolute;
height: 35px;
width: 35px;
Expand All @@ -194,7 +194,7 @@ exports[`CircleLoader common specs should match snapshot 1`] = `
animation: animation-0 1s 0.6000000000000001s infinite linear;
}
.emotion-01wtwgn9 {
.emotion-5 {
position: absolute;
height: 30px;
width: 30px;
Expand Down Expand Up @@ -223,24 +223,20 @@ exports[`CircleLoader common specs should match snapshot 1`] = `
className="emotion-0"
>
<span
className="emotion-0yrmx0p"
>
<span
className="emotion-018jumju"
/>
<span
className="emotion-01ix8i79"
/>
<span
className="emotion-0mdd9ud"
/>
<span
className="emotion-0qbu4to"
/>
<span
className="emotion-01wtwgn9"
/>
</span>
className="emotion-1"
/>
<span
className="emotion-2"
/>
<span
className="emotion-3"
/>
<span
className="emotion-4"
/>
<span
className="emotion-5"
/>
</span>
</Loader>
`;

0 comments on commit f413968

Please sign in to comment.