This repository has been archived by the owner on Nov 8, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 281
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1494 from apiaryio/honzajavorek/circleci
Switch Dredd to CircleCI
- Loading branch information
Showing
8 changed files
with
156 additions
and
88 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,133 @@ | ||
version: 2.1 | ||
|
||
|
||
commands: | ||
npm-install: | ||
steps: | ||
- run: echo $(node --version) > .node-version | ||
- restore_cache: | ||
key: js-deps-{{ checksum ".node-version" }}-{{ checksum "package.json" }} | ||
- run: npm install --no-save | ||
- save_cache: | ||
key: js-deps-{{ checksum "package.json" }} | ||
paths: | ||
- ./node_modules | ||
|
||
pip-install-docs: | ||
steps: | ||
- run: echo $(python --version) > .python-version | ||
- restore_cache: | ||
key: py-deps-{{ checksum ".python-version" }}-{{ checksum "docs/requirements.txt" }} | ||
- run: "if [ ! -d ./venv ]; then python -m venv ./venv; fi" | ||
- run: echo "source $(pwd)/venv/bin/activate" >> $BASH_ENV | ||
- run: pip install -r ./docs/requirements.txt | ||
- save_cache: | ||
key: py-deps-{{ checksum "docs/requirements.txt" }} | ||
paths: | ||
- ./venv | ||
|
||
|
||
aliases: | ||
- &node12 | ||
image: circleci/node:12 | ||
|
||
- &python-docs | ||
# using Python 3.6 as that's the version ReadTheDocs is running | ||
image: circleci/python:3.6-node | ||
|
||
- &test-steps | ||
steps: | ||
- checkout | ||
- npm-install | ||
- run: npm run ci:test | ||
|
||
|
||
jobs: | ||
test-node12: | ||
docker: [<<: *node12] | ||
<<: *test-steps | ||
|
||
test-node10: | ||
docker: [image: circleci/node:10] | ||
<<: *test-steps | ||
|
||
test-node8: | ||
docker: [image: circleci/node:8] | ||
<<: *test-steps | ||
|
||
test-e2e-apib: | ||
docker: [<<: *node12] | ||
steps: | ||
- checkout | ||
- npm-install | ||
- run: npm run e2e:apib | ||
|
||
test-e2e-openapi2: | ||
docker: [<<: *node12] | ||
steps: | ||
- checkout | ||
- npm-install | ||
- run: npm run e2e:openapi2 | ||
|
||
quality-checks: | ||
docker: [<<: *python-docs] | ||
steps: | ||
- checkout | ||
- npm-install | ||
- pip-install-docs | ||
- run: npm run ci:lint | ||
|
||
docs-dry-run: | ||
# 'dry run', because production build happens directly on the ReadTheDocs | ||
# infrastructure | ||
docker: [<<: *python-docs] | ||
steps: | ||
- checkout | ||
- npm-install | ||
- pip-install-docs | ||
- run: npm run ci:docs | ||
|
||
smoke-tests: | ||
docker: | ||
- <<: *node12 | ||
- image: circleci/mongo:latest | ||
steps: | ||
- checkout | ||
- npm-install | ||
- run: npm run ci:smoke | ||
|
||
release: | ||
# the GH_TOKEN and NPM_TOKEN environment variables are expected to be set | ||
# in https://circleci.com/gh/apiaryio/dredd/edit#env-vars | ||
docker: [<<: *node12] | ||
steps: | ||
- checkout | ||
- npm-install | ||
- run: npm run ci:release | ||
|
||
|
||
workflows: | ||
version: 2 | ||
test-and-release: | ||
jobs: | ||
- quality-checks | ||
- test-node12 | ||
- test-node10 | ||
- test-node8 | ||
- test-e2e-apib | ||
- test-e2e-openapi2 | ||
- smoke-tests | ||
- docs-dry-run | ||
- release: | ||
requires: | ||
- quality-checks | ||
- test-node12 | ||
- test-node10 | ||
- test-node8 | ||
- test-e2e-apib | ||
- test-e2e-openapi2 | ||
- smoke-tests | ||
- docs-dry-run | ||
filters: | ||
branches: | ||
only: master |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,11 @@ | ||
#!/bin/bash | ||
# Validates format of the commit messages on Travis CI | ||
# Validates format of the commit messages on CI | ||
|
||
|
||
set -e # aborts as soon as anything returns non-zero exit status | ||
|
||
|
||
if [ ! -z "$TRAVIS" ]; then | ||
git remote set-branches origin master | ||
git fetch --unshallow --quiet | ||
git checkout master --quiet | ||
git checkout - --quiet | ||
./node_modules/.bin/commitlint-travis | ||
if [ ! -z "$CIRCLECI" ]; then | ||
npx commitlint-circle | ||
else | ||
./node_modules/.bin/commitlint --from=master | ||
npx commitlint --from=master | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters