-
Notifications
You must be signed in to change notification settings - Fork 203
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci(): migrate to circleci instead of travis
- Loading branch information
1 parent
61df39c
commit fd3e945
Showing
3 changed files
with
82 additions
and
36 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,82 @@ | ||
version: 2 | ||
|
||
aliases: | ||
- &restore-cache | ||
restore_cache: | ||
key: dependency-cache-{{ checksum "package.json" }} | ||
- &install-deps | ||
run: | ||
name: Install dependencies | ||
command: npm ci | ||
- &build-packages | ||
run: | ||
name: Build | ||
command: npm run build | ||
|
||
jobs: | ||
build: | ||
working_directory: ~/nest | ||
docker: | ||
- image: circleci/node:12 | ||
steps: | ||
- checkout | ||
- run: | ||
name: Update NPM version | ||
command: 'sudo npm install -g npm@latest' | ||
- restore_cache: | ||
key: dependency-cache-{{ checksum "package.json" }} | ||
- run: | ||
name: Install dependencies | ||
command: npm ci | ||
- save_cache: | ||
key: dependency-cache-{{ checksum "package.json" }} | ||
paths: | ||
- ./node_modules | ||
- run: | ||
name: Build | ||
command: npm run build | ||
|
||
integration_tests: | ||
working_directory: ~/nest | ||
machine: true | ||
steps: | ||
- checkout | ||
- run: | ||
name: Prepare nvm | ||
command: | | ||
echo 'export NVM_DIR="/opt/circleci/.nvm"' >> $BASH_ENV | ||
echo ' [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"' >> $BASH_ENV | ||
- run: | ||
name: Upgrade Node.js | ||
command: | | ||
nvm install v12 | ||
node -v | ||
nvm alias default v12 | ||
- run: | ||
name: Install Docker Compose | ||
command: | | ||
curl -L https://github.com/docker/compose/releases/download/1.19.0/docker-compose-`uname -s`-`uname -m` > ~/docker-compose | ||
chmod +x ~/docker-compose | ||
sudo mv ~/docker-compose /usr/local/bin/docker-compose | ||
- *install-deps | ||
- run: | ||
name: Prepare | ||
command: | | ||
docker-compose up -d | ||
sleep 10 | ||
- run: | ||
name: List containers | ||
command: docker ps | ||
- run: | ||
name: e2e tests | ||
command: npm run test:integration | ||
|
||
workflows: | ||
version: 2 | ||
build-and-test: | ||
jobs: | ||
- build | ||
- integration_tests: | ||
requires: | ||
- build | ||
|
This file was deleted.
Oops, something went wrong.
File renamed without changes.