Skip to content

Instantly share code, notes, and snippets.

@jeanjmichel
Created January 22, 2020 20:25
Show Gist options
  • Save jeanjmichel/9a3b191cdb2b7d7e165b5a33f50c9e32 to your computer and use it in GitHub Desktop.
Save jeanjmichel/9a3b191cdb2b7d7e165b5a33f50c9e32 to your computer and use it in GitHub Desktop.
Exemplo de descritor de build para o Circle CI construir uma aplicação TypeScript
version: 2.1
references:
default_container_config: &default_container_config
docker:
- image: circleci/node:10
working_directory: ~/repo
commands:
install_and_cache_dependencies:
description: "Checkout, get cache, install and save cache"
steps:
- checkout
- restore_cache:
keys:
- v1-dependencies-{{ checksum "yarn.lock" }}
- run: yarn install
- save_cache:
paths:
- node_modules
key: v1-dependencies-{{ checksum "yarn.lock" }}
jobs:
build:
<<: *default_container_config
steps:
- install_and_cache_dependencies
- run:
name: "Showing the current branch..."
command: echo ${CIRCLE_BRANCH}
- run:
name: "Building the bundle..."
command: yarn build 2>/dev/null
- persist_to_workspace:
root: .
paths:
- dist
test-lint:
<<: *default_container_config
steps:
- install_and_cache_dependencies
- run:
name: "Running lint tests..."
command: yarn lint
workflows:
build-test-and-deploy:
jobs:
- build
- test-lint
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment