Skip to content
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

Migrate CI #639

Merged
merged 12 commits into from Feb 2, 2023
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
78 changes: 0 additions & 78 deletions .circleci/config.yml

This file was deleted.

15 changes: 8 additions & 7 deletions .github/workflows/nodejs.yml → .github/workflows/build.yml
@@ -1,4 +1,4 @@
name: Node.js CI
name: Unit test

on:
push:
Expand All @@ -9,19 +9,20 @@ on:

jobs:
build:
runs-on: ${{ matrix.os }}

strategy:
matrix:
os: [ubuntu-latest, windows-latest]
node-version: [16.x]
os: [ubuntu-latest]
node-version: [18.x]

runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'yarn'
- run: yarn install --frozen-lockfile
- run: yarn bootstrap
- run: yarn build
Expand Down
35 changes: 35 additions & 0 deletions .github/workflows/integrated_test.yml
@@ -0,0 +1,35 @@
name: Integrated Test

on:
push:
branches:
- master
- next
pull_request:

jobs:
test:
runs-on: ubuntu-latest

strategy:
matrix:
example_dir:
- examples/v5-managed-react-legacy-decorator
- examples/v5-simple
- examples/v6-managed-react
- examples/v6-simple
- examples/v6-story-store-v7

steps:
- uses: actions/checkout@v3
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: 16.x
cache: 'yarn'
- run: yarn install --frozen-lockfile
- run: yarn bootstrap
- run: yarn build
- run: yarn e2e ${{ matrix.example_dir }}
env:
CI: true
32 changes: 32 additions & 0 deletions .github/workflows/publish.yml
@@ -0,0 +1,32 @@
name: publish

on:
push:
tags:
- '*'

jobs:
publish:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [18.x]

steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'yarn'
- run: yarn install --frozen-lockfile
- run: yarn bootstrap
- name: npm publish
run: |
echo "//registry.npmjs.org/:_authToken=${NPM_AUTH_TOKEN}" > ~/.npmrc
npm whoami
yarn deploy:ci
env:
NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
CI: true
3 changes: 0 additions & 3 deletions README.md
Expand Up @@ -6,7 +6,6 @@
![DEMO](https://raw.githubusercontent.com/reg-viz/storycap/artwork/demo_v2.gif)

[![npm](https://img.shields.io/npm/v/storycap.svg?style=flat-square)](https://www.npmjs.com/package/storycap)
[![CircleCI](https://circleci.com/gh/reg-viz/storycap.svg?style=svg)](https://circleci.com/gh/reg-viz/storycap)

> A [Storybook][storybook] Addon, Save the screenshot image of your stories :camera: via [Puppeteer][puppeteer].

Expand Down Expand Up @@ -530,11 +529,9 @@ You can change search channel with `--chromiumChannel` option or set executable
Storycap is tested with the followings versions:

- Simple mode:
- [x] Storybook v4.x
- [x] Storybook v5.x
- [x] Storybook v6.x
- Managed mode:
- [x] Storybook v4.x
- [x] Storybook v5.x
- [x] Storybook v6.x

Expand Down
4 changes: 2 additions & 2 deletions e2e.sh
Expand Up @@ -20,8 +20,8 @@ function run() {
echo ""
}

total=${CIRCLE_NODE_TOTAL:-1}
current_idx=${CIRCLE_NODE_INDEX:-0}
total=${NODE_TOTAL:-1}
current_idx=${NODE_INDEX:-0}

rm -rf __screenshots__
mkdir -p __screenshots__/examples
Expand Down
21 changes: 0 additions & 21 deletions examples/v4-managed-react/.gitignore

This file was deleted.

5 changes: 0 additions & 5 deletions examples/v4-managed-react/.storybook/addons.js

This file was deleted.

15 changes: 0 additions & 15 deletions examples/v4-managed-react/.storybook/config.js

This file was deleted.