This repository was archived by the owner on Sep 13, 2024. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1313 steps :
1414 - checkout
1515 - run : yarn install
16- - run : yarn happo-ci
16+ - run : yarn happo-ci-circleci
1717
1818
Original file line number Diff line number Diff line change 1+ # This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
2+ # For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
3+
4+ name : Happo CI
5+
6+ on :
7+ push :
8+ branches : [ master ]
9+ pull_request :
10+ branches : [ master ]
11+
12+ jobs :
13+ build :
14+ runs-on : ubuntu-latest
15+ steps :
16+ - uses : actions/checkout@v2
17+ - uses : actions/setup-node@v1
18+ - name : install modules
19+ run : yarn install
20+ - name : happo
21+ run : yarn happo-ci-github-actions
22+ env :
23+ HAPPO_API_KEY : ${{ secrets.HAPPO_API_KEY }}
24+ HAPPO_API_SECRET : ${{ secrets.HAPPO_API_SECRET }}
Original file line number Diff line number Diff line change @@ -26,6 +26,8 @@ module.exports = {
2626 } ) ,
2727 } ,
2828
29+ project : process . env . HAPPO_PROJECT ,
30+
2931 plugins : [
3032 happoPluginStorybook ( ) ,
3133 ] ,
Original file line number Diff line number Diff line change @@ -2,4 +2,4 @@ language: node_js
22node_js :
33 - " 10"
44before_script : env
5- script : yarn happo-ci-travis
5+ script : echo 'disabled'
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ # Make the whole script fail on errors
4+ set -euo pipefail
5+
6+ # Prepare environment variables found in the github event json file.
7+ ENV_VARS=$( echo "
8+ const json = require('$GITHUB_EVENT_PATH ');
9+ if (!process.env.PREVIOUS_SHA) {
10+ console.log(\` export PREVIOUS_SHA=\$ {json.pull_request.base.sha}\` );
11+ }
12+ if (!process.env.CURRENT_SHA) {
13+ console.log(\` export CURRENT_SHA=\$ {json.pull_request.head.sha}\` );
14+ }
15+ if (!process.env.CHANGE_URL) {
16+ console.log(\` export CHANGE_URL=\$ {json.pull_request.html_url}\` );
17+ }
18+ " | node)
19+ eval $ENV_VARS
20+
21+ export HAPPO_IS_ASYNC=true
22+
23+ # Delegate to the canonical script. It will use the env variables we have
24+ # prepared.
25+ #
26+ yarn happo-ci
Original file line number Diff line number Diff line change 99 },
1010 "scripts" : {
1111 "happo" : " happo" ,
12- "happo-ci" : " happo-ci-circleci" ,
12+ "happo-ci" : " happo-ci" ,
13+ "happo-ci-circleci" : " happo-ci-circleci" ,
1314 "happo-ci-travis" : " happo-ci-travis" ,
15+ "happo-ci-github-actions" : " ./happo-ci-github-actions" ,
1416 "start" : " react-scripts start" ,
1517 "build" : " react-scripts build" ,
1618 "test" : " react-scripts test" ,
3537 "@storybook/react" : " ^4.1.4" ,
3638 "babel-loader" : " ^8.0.4" ,
3739 "happo-plugin-storybook" : " ^1.1.4" ,
38- "happo.io" : " ^3 .5.1 -rc.10 "
40+ "happo.io" : " ^5 .5.0 -rc.1 "
3941 }
4042}
You can’t perform that action at this time.
0 commit comments