Skip to content

Commit

Permalink
ci: temporary rollback to travis
Browse files Browse the repository at this point in the history
  • Loading branch information
antongolub committed Apr 2, 2021
1 parent 79eaab9 commit 0268a05
Show file tree
Hide file tree
Showing 2 changed files with 78 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yaml → .github/workflows/ci._yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# If the tests pass and this is a push to the master branch it also runs Semantic Release.
name: CI
on: [push, pull_request]

jobs:
init:
name: init
Expand Down Expand Up @@ -133,12 +134,11 @@ jobs:

- name: Multi-semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
GH_TOKEN: ${{ secrets.GH_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_USER: 'qiwibot'
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
GIT_AUTHOR_EMAIL: '[email protected]'
GIT_COMMITTER_EMAIL: '[email protected]'
GIT_AUTHOR_NAME: '@qiwibot'
GIT_COMMITTER_NAME: '@qiwibot'
run: GH_TOKEN="$GH_TOKEN" GH_USER="$GH_USER" NPM_TOKEN="$NPM_TOKEN" GIT_AUTHOR_EMAIL="$GIT_AUTHOR_EMAIL" GIT_COMMITTER_EMAIL="$GIT_COMMITTER_EMAIL" GIT_AUTHOR_NAME="$GIT_AUTHOR_NAME" GIT_COMMITTER_NAME="$GIT_COMMITTER_NAME" npx -p @qiwi/semrel-toolkit multi-semrel
run: npx -p @qiwi/semrel-toolkit multi-semrel
75 changes: 75 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
language: node_js
node_js: 14
install: skip
cache: yarn

os: linux
dist: focal

branches:
except:
- docs
- gh-pages

jobs:
fast_finish: true
include:
- stage: verify
if: branch != master AND type != pull_request
install:
- yarn
- yarn bootstrap
script:
- yarn build
- if [ "$CI_TEST" != "false" ]; then
yarn test;
fi
- &build
if: branch = master
stage: build
install:
- yarn
- yarn bootstrap
script:
- yarn build

# https://docs.travis-ci.com/user/using-workspaces/
workspaces:
create:
name: linux-shared
paths:
- node_modules
- packages

- &test
if: branch = master AND type = pull_request AND env(CI_TEST) != false
stage: test
script: yarn test
workspaces:
use: linux-shared

- <<: *test
if: branch = master AND type != pull_request AND env(CI_TEST) != false
before_script:
- if [ "$CC_TEST_REPORTER_ID" != "" ]; then
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter;
chmod +x ./cc-test-reporter;
./cc-test-reporter before-build;
fi
script:
- if [ "$CC_TEST_REPORTER_ID" != "" ]; then
yarn test:report;
else
yarn test;
fi
after_script:
- if [ "$CC_TEST_REPORTER_ID" != "" ]; then
./cc-test-reporter format-coverage -t lcov ./coverage/lcov.info;
./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT;
fi

- stage: release
if: branch = master AND type != pull_request AND env(CI_RELEASE) = true
workspaces:
use: linux-shared
script: npx -p @qiwi/semrel-toolkit multi-semrel

0 comments on commit 0268a05

Please sign in to comment.