diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index 3e8e4d749afbebdbb2679c957d18f794ec4dfec8..0000000000000000000000000000000000000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,108 +0,0 @@ -version: 2.1 -commands: - test: - steps: - - checkout - - run: - name: Initial Setup - command: | - python --version - python3 --version - curl https://bootstrap.pypa.io/get-pip.py | python - pip --version - git config --global user.email "bot@renovateapp.com" - git config --global user.name "Renovate Bot" - git --version - - - restore_cache: - keys: - - dependency-cache-v2-{{ .Branch }}-{{ checksum "yarn.lock" }} - - dependency-cache-v2-{{ .Branch }}- - - dependency-cache-v2- - - dependency-cache- - - - run: - name: Installing Dependencies - command: | - yarn install --frozen-lockfile - pip install --user -r requirements.txt - - - save_cache: - key: dependency-cache-v2-{{ checksum "yarn.lock" }} - paths: - - ~/.cache/yarn - - ./node_modules - - '.cache' - - '.eslintcache' - - - run: - name: Lint - command: | - yarn eslint --format junit -o test-results/lint/results.xml - yarn prettier - yarn test-schema - yarn type-check - - - run: - name: Build - command: | - yarn build - - - run: - name: Unit Tests - command: | - yarn jest --maxWorkers=2 --ci --reporters=default --reporters=jest-junit - environment: - JEST_JUNIT_OUTPUT_DIR: 'test-results/jest' - JEST_JUNIT_OUTPUT_NAME: 'results.xml' - SKIP_JAVA_TESTS: 'true' - - - store_test_results: - path: test-results - - store_artifacts: - path: test-results - - - run: - name: E2E Tests - command: | - yarn test-e2e - - - run: - name: Coverage - command: | - bash <(curl -s https://codecov.io/bash) -Z -C $CIRCLE_SHA1 - when: always -jobs: - test_node_10: - docker: - - image: amd64/node:10.19.0@sha256:06e80d0a45ea264fa69296cce992bc6f9c6956ff18f314c6211ba5b0db34e468 - steps: - - test - release: - docker: - - image: amd64/node:10.19.0@sha256:06e80d0a45ea264fa69296cce992bc6f9c6956ff18f314c6211ba5b0db34e468 - steps: - - checkout - - restore_cache: - keys: - - dependency-cache-v2-{{ .Branch }}-{{ checksum "yarn.lock" }} - - dependency-cache-v2-{{ .Branch }}- - - dependency-cache-v2- - - dependency-cache- - - run: yarn install --frozen-lockfile - - run: yarn build - - run: yarn semantic-release - - run: curl -X POST -d '{}' $NETLIFY_DEPLOY_WEBHOOK - -workflows: - version: 2 - test_and_release: - jobs: - - test_node_10 - - release: - requires: - - test_node_10 - filters: - branches: - only: - - master diff --git a/.github/workflows/test.yml b/.github/workflows/test-and-release.yml similarity index 70% rename from .github/workflows/test.yml rename to .github/workflows/test-and-release.yml index bbf04fb797f83dead30a1461b6f954a59a25a2e6..90efa94b15fba67c59ffce47d073c11c5c6c5010 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test-and-release.yml @@ -126,3 +126,56 @@ jobs: - name: E2E Test run: yarn test-e2e + + release: + name: release + needs: test + runs-on: ubuntu-latest + if: github.ref == 'refs/heads/master' + + # tests shouldn't nee more than 10 min + timeout-minutes: 15 + + steps: + - name: Set up Node.js + uses: actions/setup-node@v1 + with: + node-version: 12 + + - name: Init platform + id: init + shell: bash + run: | + echo "::set-output name=yarn_cache::$(yarn cache dir)" + git config --global core.autocrlf false + git config --global core.symlinks true + git config --global user.email 'bot@renovateapp.com' + git config --global user.name 'Renovate Bot' + node --version + yarn --version + + - uses: actions/checkout@v2 + + - name: Cache Yarn packages + id: yarn_cache_packages + uses: actions/cache@v1 + with: + path: ${{ steps.init.outputs.yarn_cache }} + key: v1-${{ runner.os }}-yarn_cache-${{ hashFiles('**/yarn.lock') }} + restore-keys: | + v1-${{ runner.os }}-yarn_cache- + + - name: Cache node_modules + uses: actions/cache@v1 + with: + path: node_modules + key: ${{ runner.os }}-${{ matrix.node-version }}-yarn-${{ hashFiles('**/yarn.lock') }} + restore-keys: | + ${{ runner.os }}-${{ matrix.node-version }}-yarn- + + - run: yarn install --frozen-lockfile + - run: yarn build + - run: yarn semantic-release + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + NPM_TOKEN: ${{ secrets.NPM_TOKEN }}