Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate CI config to CircleCI v2 #212

Merged
merged 6 commits into from
Dec 7, 2018
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
version: 2.1
executors:
node-11:
wtho marked this conversation as resolved.
Show resolved Hide resolved
docker:
- image: circleci/node:10
jobs:
build:
executor: node-11
steps:
- checkout
- restore_cache:
keys:
# when lock file changes, we still use increasingly general patterns to restore cache
# the install afterwards will only install packages with different versions
- yarn-cache-{{ .Branch }}-{{ checksum "yarn.lock" }}
- yarn-cache-{{ .Branch }}-
- run:
name: Install dependencies
command: |
yarn --version
yarn install --frozen-lockfile
cd example
yarn install --frozen-lockfile
wtho marked this conversation as resolved.
Show resolved Hide resolved
- save_cache:
key: yarn-cache-{{ .Branch }}-{{ checksum "yarn.lock" }}
paths:
- ~/.yarn
- ~/.cache/yarn
- ./node_modules
- ./example/node_modules
- run:
name: Test Library
command: |
yarn test:ci
- run:
name: Test Example App
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think these two (test example and library) can go into workflows. I like to use this as a reference: https://github.com/callstack/react-native-paper/blob/master/.circleci/config.yml

Copy link
Collaborator Author

@wtho wtho Dec 6, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, had them first put it in one step, but I preferred the immediate overview in the circleci-panel, in which part of the app the tests would fail. See this example

If you prefer them to be summarized, I can reduce them to one step.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh now I got you, overlooked workflows
Will set that up 😄

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, so I made it work.
The overview is more extendable and tests run parallel, but currentlly we lose about 30s for not running in one workspace (workspace has to be persisted and attached between different jobs).

I still prefer it, as it gives a better overview, especially if we might later choose to add linting, generating docs, ... (see workflow example from react-native-paper)

command: |
cd example
yarn test:ci
yarn test:coverage
23 changes: 0 additions & 23 deletions circle.yml

This file was deleted.