From c5bc09fde7095d1bb490a089e119aa7e9edd66fb Mon Sep 17 00:00:00 2001 From: Jaco Greeff Date: Wed, 9 Oct 2019 14:08:27 +0200 Subject: [PATCH] Swap CI to GH actions (#477) --- .circleci/config.yml | 21 --------------------- .github/workflows/pr-any.yml | 6 ++++++ .github/workflows/push-master.yml | 9 ++++++++- .travis.yml | 28 ---------------------------- package.json | 4 ++-- yarn.lock | 16 ++++++++-------- 6 files changed, 24 insertions(+), 60 deletions(-) delete mode 100644 .circleci/config.yml delete mode 100644 .travis.yml diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index 2b5b9b22b..000000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,21 +0,0 @@ -version: 2 -jobs: - build: - working_directory: ~/polkadot-js - docker: - - image: circleci/node:10 - steps: - - checkout - - restore_cache: - key: dependency-cache-{{ checksum "yarn.lock" }} - - run: - name: install-deps - command: yarn install --frozen-lockfile - - save_cache: - key: dependency-cache-{{ checksum "yarn.lock" }} - paths: - - ./node_modules - - ~/.cache/yarn - - run: - name: build - command: yarn polkadot-dev-circleci-build diff --git a/.github/workflows/pr-any.yml b/.github/workflows/pr-any.yml index 637916408..19aad3588 100644 --- a/.github/workflows/pr-any.yml +++ b/.github/workflows/pr-any.yml @@ -32,9 +32,15 @@ jobs: with: node-version: ${{ matrix.node-version }} - name: test + env: + CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }} run: | + curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter + chmod +x ./cc-test-reporter yarn install --frozen-lockfile + ./cc-test-reporter before-build yarn test + ./cc-test-reporter after-build --exit-code 0 build_code: name: Build Code diff --git a/.github/workflows/push-master.yml b/.github/workflows/push-master.yml index fada2077d..bf6683e25 100644 --- a/.github/workflows/push-master.yml +++ b/.github/workflows/push-master.yml @@ -18,6 +18,13 @@ jobs: with: node-version: ${{ matrix.node-version }} - name: build + env: + CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }} + GH_PAT: ${{ secrets.GH_PAT }} + GH_PAGES_SRC: build-docs + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} run: | yarn install --frozen-lockfile - yarn build + yarn polkadot-dev-ghact-build + yarn polkadot-dev-ghact-deploy diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 1fa893c32..000000000 --- a/.travis.yml +++ /dev/null @@ -1,28 +0,0 @@ -language: node_js -node_js: - - "10" -env: - global: - - CC_TEST_REPORTER_ID=27a299582eb7fd9580e27897a6ecda1c82a1cd24bcfe2f2ebda1ca70238509b4 - - GH_PAGES_SRC="build-docs" -cache: - yarn: true - directories: - - node_modules -before_install: - - curl -o- -L https://yarnpkg.com/install.sh | bash - - curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter - - chmod +x ./cc-test-reporter - - export PATH=$HOME/.yarn/bin:$(yarn global bin):$PATH -before_script: - - ./cc-test-reporter before-build -script: - - yarn polkadot-dev-travis-build -after_script: - - ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT -deploy: - skip_cleanup: true - provider: script - script: yarn polkadot-dev-travis-deploy - on: - branch: master diff --git a/package.json b/package.json index c90942797..a1c6ccdcd 100644 --- a/package.json +++ b/package.json @@ -24,8 +24,8 @@ }, "devDependencies": { "@babel/core": "^7.6.2", - "@polkadot/dev": "^0.32.0-beta.4", - "@polkadot/ts": "^0.1.78", + "@polkadot/dev": "^0.32.0-beta.6", + "@polkadot/ts": "^0.1.80", "gh-pages": "^2.1.1" } } diff --git a/yarn.lock b/yarn.lock index be192fc2f..fd3c5199f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1777,10 +1777,10 @@ once "^1.4.0" universal-user-agent "^4.0.0" -"@polkadot/dev@^0.32.0-beta.4": - version "0.32.0-beta.4" - resolved "https://registry.yarnpkg.com/@polkadot/dev/-/dev-0.32.0-beta.4.tgz#dee47a0490fcb6d97603396227a20e5c50ee1557" - integrity sha512-IDWrG5q7VxH5ObR6xRdATj6BzNxrbIzgRmVy3FClVaBTwp0E/FAiDveeG1bJwVIco/xpLCA649Gl1aYmSZgIHQ== +"@polkadot/dev@^0.32.0-beta.6": + version "0.32.0-beta.6" + resolved "https://registry.yarnpkg.com/@polkadot/dev/-/dev-0.32.0-beta.6.tgz#e013431e24eefcff6374f12cad6d0b8aee3e8a97" + integrity sha512-GlDmiN99+EvxctoL0TD3Raqfuz9eaOGTbS2Nt/4vQfy7nmLGNdQHU45lIkQag/kdQow5tMsUueaQbARcKcplYw== dependencies: "@babel/cli" "^7.6.2" "@babel/core" "^7.6.2" @@ -1822,10 +1822,10 @@ typescript "^3.6.3" vuepress "^1.1.0" -"@polkadot/ts@^0.1.78": - version "0.1.78" - resolved "https://registry.yarnpkg.com/@polkadot/ts/-/ts-0.1.78.tgz#a1d9db08508c1c7c5e12a07370f9e58b4e9d8a78" - integrity sha512-kBzMYqS5u9fVfrCwO8JmJ0jGCKIqDu27U+o9FoBh0rfTf4pebfse9QV/ed8B0Tu8dvU98LlXpZeXhbp8krJIjA== +"@polkadot/ts@^0.1.80": + version "0.1.80" + resolved "https://registry.yarnpkg.com/@polkadot/ts/-/ts-0.1.80.tgz#6c8acc72e453993e22c9ced53c1b5913650b97b9" + integrity sha512-/8Dpku/ZeyWIQicz4p/4yblNKavDvPcSVbFMfPLfSLtZBSHTW5XytIwZWxrwB3Y+zoGf8bzNLBSSxk+EDJhXJg== dependencies: "@types/chrome" "^0.0.89"