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

Set up Commitizen, CircleCI, and semantic-release #50

Merged
merged 18 commits into from
Dec 4, 2018
Merged
Show file tree
Hide file tree
Changes from 17 commits
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
193 changes: 193 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,193 @@
version: 2.1

defaults: &defaults
docker:
- image: circleci/node

working_directory: ~/app





jobs:
checkout:
<<: *defaults

steps:
- restore_cache:
name: Restore Repository Cache
keys:
- repo-{{ .Branch }}-{{ .Environment.CIRCLE_SHA1 }}
- repo-{{ .Branch }}
- repo-master
- repo-

- checkout

- save_cache:
name: Save Repository Cache
key: repo-{{ .Branch }}-{{ .Environment.CIRCLE_SHA1 }}
paths:
- .

- persist_to_workspace:
root: .
paths:
- .

install-dependencies:
<<: *defaults

steps:
- attach_workspace:
at: .

- restore_cache:
name: Restore npm Package Cache
keys:
- npm-{{ checksum "package-lock.json" }}
- npm-

- run:
name: Install Dependencies
command: npm install

- save_cache:
name: Save npm Package Cache
key: npm-{{ checksum "package-lock.json" }}
paths:
- node_modules

- persist_to_workspace:
root: .
paths:
- node_modules

build:
<<: *defaults

steps:
- attach_workspace:
at: .

- restore_cache:
name: Restore Build Cache
keys:
- build-{{ .Branch }}-{{ .Environment.CIRCLE_SHA1 }}
- build-{{ .Branch }}
- build-master
- build-

- run:
name: Build the Framework
command: npm run build

- save_cache:
name: Save Build Cache
key: build-{{ .Branch }}-{{ .Environment.CIRCLE_SHA1 }}
paths:
- css

- persist_to_workspace:
root: .
paths:
- css

lint:
<<: *defaults

steps:
- attach_workspace:
at: .

- run:
name: Lint styles
command: npx stylelint -- --fix

- run:
name: Lint commit messages
command: npx semantic-commitlint -- --ci

# test:
# <<: *defaults

# steps:
# - attach_workspace:
# at: .

# - run:
# name: Add Yarn Binary Folder To $PATH
# command: export PATH="$PATH:`yarn global bin`"

# - run:
# name: Run tests
# command: yarn test

# coverage:
# <<: *defaults

# steps:
# - attach_workspace:
# at: .

# - run:
# name: Add Yarn Binary Folder To $PATH
# command: export PATH="$PATH:`yarn global bin`"

# - run:
# name: Generate and upload coverage report
# command: yarn test-coverage

release:
<<: *defaults

steps:
- attach_workspace:
at: .

- run:
command: mkdir ~/.ssh/ && echo -e "Host github.com\n\tStrictHostKeyChecking no\n" > ~/.ssh/config

- run:
name: Release
command: npx semantic-release





workflows:
version: 2

main:
jobs:
- checkout
- install-dependencies:
requires:
- checkout
# - test:
# requires:
# - install-dependencies
# - coverage:
# requires:
# - install-dependencies
- lint:
requires:
- install-dependencies
- build:
requires:
- install-dependencies
filters:
branches:
only:
- master
- develop
- release:
requires:
# - test
- build
- lint
filters:
branches:
only: master
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@
<a href="README.md">English</a> / <a href="README-jp.md">日本語</a>
</div>

NES.css is a **NES-style(8bit-like)** CSS Framework.
[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/)

NES.css is a **NES-style(8bit-like)** CSS Framework.

## Install

Expand Down
8 changes: 8 additions & 0 deletions commitlint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/* eslint-env node */

module.exports = {
extends: ['@commitlint/config-conventional'],

// Add your own rules. See http://marionebl.github.io/commitlint
rules: {}
}
5 changes: 3 additions & 2 deletions css/nes.min.css

Large diffs are not rendered by default.

Loading