Skip to content

Commit

Permalink
ci: add lint
Browse files Browse the repository at this point in the history
  • Loading branch information
uiolee committed Feb 2, 2024
1 parent 2900ca5 commit 36101eb
Show file tree
Hide file tree
Showing 3 changed files with 79 additions and 52 deletions.
75 changes: 75 additions & 0 deletions .github/workflows/ci.yml
@@ -0,0 +1,75 @@
name: CI

on:
push:
branches:
- "master"
pull_request:

env:
default_node_version: 14

jobs:
test:
name: Test
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
node-version: ["14", "16", "18"]
fail-fast: false
steps:
- uses: actions/checkout@v4
- name: Setup Node.js ${{ matrix.node-version }} and Cache
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: npm
cache-dependency-path: "package.json"

- name: Install Dependencies
run: npm install
- name: git-config
run: git config --global user.email "you@example.com" && git config --global user.name "Your Name"
- name: Test
run: npm run test -- --no-parallel

coverage:
name: Coverage
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Node.js ${{env.default_node_version}} and Cache
uses: actions/setup-node@v4
with:
node-version: ${{env.default_node_version}}
cache: npm
cache-dependency-path: "package.json"

- name: Install Dependencies
run: npm install
- name: git-config
run: git config --global user.email "you@example.com" && git config --global user.name "Your Name"
- name: Coverage
run: npm run test-cov
- name: Coveralls
uses: coverallsapp/github-action@v2
with:
github-token: ${{ secrets.github_token }}

lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Node.js ${{env.default_node_version}} and Cache
uses: actions/setup-node@v4
with:
node-version: ${{env.default_node_version}}
cache: npm
cache-dependency-path: "package.json"

- name: Install Dependencies
run: npm install
- name: Lint
run: npm run eslint
50 changes: 0 additions & 50 deletions .github/workflows/tester.yml

This file was deleted.

6 changes: 4 additions & 2 deletions README.md
@@ -1,12 +1,13 @@
# hexo-deployer-git

[![Build Status](https://github.com/hexojs/hexo-deployer-git/workflows/Tester/badge.svg)](https://github.com/hexojs/hexo-deployer-git/actions?query=workflow%3ATester)
[![CI](https://github.com/hexojs/hexo-deployer-git/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/hexojs/hexo-deployer-git/actions/workflows/ci.yml)
[![NPM version](https://badge.fury.io/js/hexo-deployer-git.svg)](https://www.npmjs.com/package/hexo-deployer-git)
[![Coverage Status](https://img.shields.io/coveralls/hexojs/hexo-deployer-git.svg)](https://coveralls.io/r/hexojs/hexo-deployer-git?branch=master)
[![Coverage Status](https://coveralls.io/repos/github/hexojs/hexo-deployer-git/badge.svg)](https://coveralls.io/github/hexojs/hexo-deployer-git)

Git deployer plugin for [Hexo].

## Notice: Fatal HttpRequestException Error on pushing to GitHub?

Update [Git for Windows](https://github.com/git-for-windows/git/releases) to the latest version. ([Details](https://github.com/Microsoft/Git-Credential-Manager-for-Windows#notice-experiencing-github-pushfetch-problems))

## Installation
Expand Down Expand Up @@ -119,6 +120,7 @@ If `.deploy_git` does not exist, a repo will initialized (`git init`).
Otherwise the curent repo (with its commit history) will be used.

Users can clone the deployed repo to `.deploy_git` to keep the commit history.

```
git clone <gh-pages repo> .deploy_git
```
Expand Down

0 comments on commit 36101eb

Please sign in to comment.