chore: Disable branch execution (#125)

This commit is contained in:
Shohei Ueda 2020-01-18 00:44:07 +09:00 committed by GitHub
parent 57168bc2bc
commit 7dc067063b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 75 additions and 5328 deletions

View file

@ -1,21 +1,35 @@
name: 'Test' name: 'Test'
on: on:
pull_request:
types: [opened, synchronize]
paths-ignore:
- '**.md'
push: push:
paths-ignore:
- '**.md'
branches: branches:
- master - master
paths-ignore:
- '**.md'
pull_request:
types:
- opened
- synchronize
paths-ignore:
- '**.md'
jobs: jobs:
test: skipci:
runs-on: ubuntu-18.04 runs-on: ubuntu-18.04
steps: steps:
- run: echo "[Skip CI] ${{ contains(github.event.head_commit.message, '[skip ci]') }}"
test:
runs-on: ${{ matrix.os }}
if: contains(github.event.head_commit.message, '[skip ci]') == false
strategy:
matrix:
os:
- 'ubuntu-18.04'
- 'macos-latest'
- 'windows-latest'
steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- name: Read .nvmrc - name: Read .nvmrc
@ -27,48 +41,49 @@ jobs:
with: with:
node-version: '${{ steps.nvm.outputs.NVMRC }}' node-version: '${{ steps.nvm.outputs.NVMRC }}'
- name: Cache - name: Get npm cache directory
id: npm-cache
run: |
echo "::set-output name=dir::$(npm config get cache)"
- name: Cache npm
uses: actions/cache@v1 uses: actions/cache@v1
with: with:
path: ~/.npm path: ${{ steps.npm-cache.outputs.dir }}
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: | restore-keys: |
${{ runner.os }}-node- ${{ runner.os }}-node-
- run: npm ci - run: npm ci
- run: npm run format:check - name: Run prettier
if: startsWith(matrix.os, 'ubuntu')
run: npm run format:check
- run: npm run lint - name: Run eslint
if: startsWith(matrix.os, 'ubuntu')
run: npm run lint
- name: Run ncc
if: startsWith(matrix.os, 'ubuntu')
run: npm run build
- run: npm test - run: npm test
- name: Check ncc - name: Upload test coverage as artifact
run: |
npm run build
test -z "$(git status --short)"
- name: Upload test coverage
uses: actions/upload-artifact@v1 uses: actions/upload-artifact@v1
with: with:
name: coverage name: coverage
path: coverage path: coverage
# - name: Upload test coverage to Coveralls
test-prod: # uses: coverallsapp/github-action@v1.0.1
runs-on: ${{ matrix.os }} # with:
needs: test # github-token: ${{ secrets.GITHUB_TOKEN }}
strategy: # parallel: true
matrix: #
os: ['ubuntu-18.04', 'macos-latest', 'windows-latest'] # - name: Coveralls Finished
hugo-version: ['latest', '0.57.2'] # uses: coverallsapp/github-action@v1.0.1
extended: [true, false] # with:
# github-token: ${{ secrets.GITHUB_TOKEN }}
steps: # parallel-finished: true
- uses: actions/checkout@v2
- name: Test action
uses: ./
with:
hugo-version: ${{ matrix.hugo-version }}
extended: ${{ matrix.extended }}

5267
lib/index.js vendored

File diff suppressed because it is too large Load diff

View file

@ -15,8 +15,7 @@
"husky": { "husky": {
"skipCI": true, "skipCI": true,
"hooks": { "hooks": {
"pre-commit": "lint-staged", "pre-commit": "lint-staged"
"post-commit": "npm run build && echo '⚠️ Do not forget to Commit and Push ./lib/index.js'"
} }
}, },
"lint-staged": { "lint-staged": {