aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.circleci/config.yml125
-rw-r--r--.github/workflows/build.yaml106
-rw-r--r--package.json4
-rw-r--r--yarn.lock22
4 files changed, 119 insertions, 138 deletions
diff --git a/.circleci/config.yml b/.circleci/config.yml
deleted file mode 100644
index 22dbcfc..0000000
--- a/.circleci/config.yml
+++ /dev/null
@@ -1,125 +0,0 @@
-version: 2.1
-
-executors:
- default:
- docker:
- - image: circleci/node:14.15.1-stretch-browsers
- environment:
- - FIREFOX_VERSION: "78.3.0esr"
- - GECKODRIVER_VERSION: "0.27.0"
- working_directory: ~
-
-commands:
- install_firefox:
- steps:
- - restore_cache:
- key: firefox-bin
- paths:
- - ~/firefox
- - run:
- name: Install Firefox
- command: |
- test -d ~/firefox/${FIREFOX_VERSION} && exit 0
- url=https://ftp.mozilla.org/pub/firefox/releases/${FIREFOX_VERSION}/linux-x86_64/en-US/firefox-${FIREFOX_VERSION}.tar.bz2
- curl -sSL -o- "$url" | tar xvfj -
- mkdir -p ~/firefox
- mv firefox ~/firefox/${FIREFOX_VERSION}
- - save_cache:
- key: firefox-bin
- paths:
- - ~/firefox
- - run: echo 'export PATH=~/firefox/$FIREFOX_VERSION:$PATH' >> $BASH_ENV
-
- install_geckodriver:
- steps:
- - run:
- name: Install geckodriver
- command: |
- mkdir -p geckodriver
-
- url=https://github.com/mozilla/geckodriver/releases/download/v0.24.0/geckodriver-v${GECKODRIVER_VERSION}-linux64.tar.gz
- curl -sSLf "$url" | tar -C geckodriver xvf -
-
- echo 'export PATH=~/geckodriver/$GECKODRIVER_VERSION:$PATH' >> $BASH_ENV
-
- install_dependencies:
- steps:
- - restore_cache:
- keys:
- - yarn-packages-{{ checksum "yarn.lock" }}
- - run:
- name: Install dependencies
- command: yarn install
- - save_cache:
- key: yarn-packages-{{ checksum "yarn.lock" }}
- paths:
- - ~/.cache/yarn
-
-jobs:
- build:
- executor:
- name: default
- steps:
- - install_firefox
- - checkout
- - install_dependencies
- - run: yarn lint
- - run: yarn test
- - run: yarn package
-
- e2e:
- executor:
- name: default
- steps:
- - run: sudo apt-get update && sudo apt-get -y install xsel
- - install_firefox
- - checkout
- - install_dependencies
- - run: yarn build
- - run: yarn test:e2e
-
- deploy:
- executor:
- name: default
- steps:
- - checkout
- - install_dependencies
- - run: yarn package
- - run:
- name: Deploy to AMO
- command: |
- version=$(jq -r '.version' manifest.json)
- ./script/deploy vim-vixen@i-beam.org "$version" "vim-vixen-${version}.zip"
-
-workflows:
- version: 2
- build_and_test:
- jobs:
- - build
- - e2e:
- filters:
- branches:
- ignore: /^greenkeeper\/.*/
- deploy:
- jobs:
- - build:
- filters:
- tags:
- only: /^.*/
- branches:
- ignore: /.*/
- - e2e:
- filters:
- tags:
- only: /^.*/
- branches:
- ignore: /.*/
- - deploy:
- requires:
- - build
- - e2e
- filters:
- tags:
- only: /^.*/
- branches:
- ignore: /.*/
diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml
new file mode 100644
index 0000000..1c2fc62
--- /dev/null
+++ b/.github/workflows/build.yaml
@@ -0,0 +1,106 @@
+name: Build
+
+on:
+ push:
+ branches:
+ - "*"
+
+jobs:
+ build:
+ name: Build
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v2
+ - uses: actions/setup-node@v2
+ with:
+ node-version: '14.15.1'
+ - uses: ueokande/setup-firefox@latest
+ with:
+ firefox-version: 78.3.0esr
+ - uses: ueokande/setup-geckodriver@latest
+ with:
+ geckodriver-version: 0.28.0
+
+ - name: Get yarn cache directory path
+ id: yarn-cache-dir-path
+ run: echo "::set-output name=dir::$(yarn cache dir)"
+ - uses: actions/cache@v2
+ with:
+ path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
+ key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
+ restore-keys: |
+ ${{ runner.os }}-yarn-
+
+ - run: yarn install
+ - run: yarn lint
+ - run: yarn test
+ - run: yarn package
+
+ test-e2e:
+ name: E2E Test
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v2
+ - uses: actions/setup-node@v2
+ with:
+ node-version: '14.15.1'
+ - uses: ueokande/setup-firefox@latest
+ with:
+ firefox-version: 78.3.0esr
+ - uses: ueokande/setup-geckodriver@latest
+ with:
+ geckodriver-version: 0.28.0
+ - name: Install xsel
+ run: sudo apt-get install -y --no-install-recommends xsel
+
+ - name: Get yarn cache directory path
+ id: yarn-cache-dir-path
+ run: echo "::set-output name=dir::$(yarn cache dir)"
+ - uses: actions/cache@v2
+ with:
+ path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
+ key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
+ restore-keys: |
+ ${{ runner.os }}-yarn-
+
+ - run: yarn install
+ - run: yarn build
+ - name: Run test
+ run: |
+ export DISPLAY=:99
+
+ geckodriver &
+ sudo Xvfb -ac :99 -screen 0 1280x1024x24 >/dev/null 2>&1 &
+
+ yarn test:e2e
+
+ deploy:
+ name: Release to AMO
+ needs: [build, test-e2e]
+ if: startsWith(github.ref, 'refs/tags/v')
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v2
+ - uses: actions/setup-node@v2
+ with:
+ node-version: '14.15.1'
+
+ - name: Get yarn cache directory path
+ id: yarn-cache-dir-path
+ run: echo "::set-output name=dir::$(yarn cache dir)"
+ - uses: actions/cache@v2
+ with:
+ path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
+ key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
+ restore-keys: |
+ ${{ runner.os }}-yarn-
+
+ - run: yarn install
+ - run: yarn package
+ - name: Release to AMO
+ env:
+ JWT_ISSUER: "${{ secrets.JWT_ISSUER }}"
+ JWT_SECRET: "${{ secrets.JWT_SECRET }}"
+ run: |
+ version=$(jq -r '.version' manifest.json)
+ ./script/deploy vim-vixen@i-beam.org "$version" "vim-vixen-${version}.zip"
diff --git a/package.json b/package.json
index c525659..bff93e0 100644
--- a/package.json
+++ b/package.json
@@ -45,7 +45,7 @@
"css-loader": "^5.0.1",
"eslint": "7.16.0",
"eslint-config-prettier": "7.0.0",
- "eslint-plugin-prettier": "3.1.4",
+ "eslint-plugin-prettier": "3.3.0",
"eslint-plugin-react": "7.21.5",
"eslint-plugin-standard": "^5.0.0",
"express": "^4.17.1",
@@ -65,7 +65,7 @@
"prettier": "2.2.1",
"prettier-eslint": "12.0.0",
"react": "16.14.0",
- "react-dom": "16.13.1",
+ "react-dom": "16.14.0",
"react-redux": "^7.1.3",
"react-test-renderer": "16.13.1",
"redux": "^4.0.5",
diff --git a/yarn.lock b/yarn.lock
index d338c9f..15cee30 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -325,9 +325,9 @@
"@types/react" "*"
"@types/react-redux@^7.1.7":
- version "7.1.13"
- resolved "https://registry.yarnpkg.com/@types/react-redux/-/react-redux-7.1.13.tgz#8766a0078433621957cd78a6096d316bccbcb3ca"
- integrity sha512-+Z8C22kL/fkEWFETc+duRyJT6P23G1GbowdLgRsjPyimJdpBv52Uqg4p3vCW6qagBj4EUi5jKhe+by+Uv3+QTQ==
+ version "7.1.14"
+ resolved "https://registry.yarnpkg.com/@types/react-redux/-/react-redux-7.1.14.tgz#694609eb906ffc2da4b01f0a1e4f27c1937ac33a"
+ integrity sha512-WItBNJRC8N/HsgKFXxX8t9NjUY1vv3YTzj9m8HvmaaYRTgy3hgZMIs5ZWAJHQ58nISSakIvS6T91nhJV4iBuaA==
dependencies:
"@types/hoist-non-react-statics" "^3.3.0"
"@types/react" "*"
@@ -2248,10 +2248,10 @@ eslint-config-prettier@7.0.0:
resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-7.0.0.tgz#c1ae4106f74e6c0357f44adb076771d032ac0e97"
integrity sha512-8Y8lGLVPPZdaNA7JXqnvETVC7IiVRgAP6afQu9gOQRn90YY3otMNh+x7Vr2vMePQntF+5erdSUBqSzCmU/AxaQ==
-eslint-plugin-prettier@3.1.4:
- version "3.1.4"
- resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-3.1.4.tgz#168ab43154e2ea57db992a2cd097c828171f75c2"
- integrity sha512-jZDa8z76klRqo+TdGDTFJSavwbnWK2ZpqGKNZ+VvweMW516pDUMmQ2koXvxEE4JhzNvTv+radye/bWGBmA6jmg==
+eslint-plugin-prettier@3.3.0:
+ version "3.3.0"
+ resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-3.3.0.tgz#61e295349a65688ffac0b7808ef0a8244bdd8d40"
+ integrity sha512-tMTwO8iUWlSRZIwS9k7/E4vrTsfvsrcM5p1eftyuqWH25nKsz/o6/54I7jwQ/3zobISyC7wMy9ZsFwgTxOcOpQ==
dependencies:
prettier-linter-helpers "^1.0.0"
@@ -4911,10 +4911,10 @@ raw-body@2.4.0:
iconv-lite "0.4.24"
unpipe "1.0.0"
-react-dom@16.13.1:
- version "16.13.1"
- resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-16.13.1.tgz#c1bd37331a0486c078ee54c4740720993b2e0e7f"
- integrity sha512-81PIMmVLnCNLO/fFOQxdQkvEq/+Hfpv24XNJfpyZhTRfO0QcmQIF/PgCa1zCOj2w1hrn12MFLyaJ/G0+Mxtfag==
+react-dom@16.14.0:
+ version "16.14.0"
+ resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-16.14.0.tgz#7ad838ec29a777fb3c75c3a190f661cf92ab8b89"
+ integrity sha512-1gCeQXDLoIqMgqD3IO2Ah9bnf0w9kzhwN5q4FGnHZ67hBm9yePzB5JJAIQCc8x3pFnNlwFq4RidZggNAAkzWWw==
dependencies:
loose-envify "^1.1.0"
object-assign "^4.1.1"