Compare commits

...

20 Commits

Author SHA1 Message Date
peaceiris
95afbe8abf chore(release): 2.4.2 2020-01-24 06:32:09 +09:00
peaceiris
8f7332cde6 chore(release): Add build assets 2020-01-24 06:32:09 +09:00
dependabot-preview[bot]
699805b6e1 deps: bump standard-version from 7.0.1 to 7.1.0 (#145)
Bumps [standard-version](https://github.com/conventional-changelog/standard-version) from 7.0.1 to 7.1.0.
- [Release notes](https://github.com/conventional-changelog/standard-version/releases)
- [Changelog](https://github.com/conventional-changelog/standard-version/blob/master/CHANGELOG.md)
- [Commits](https://github.com/conventional-changelog/standard-version/compare/v7.0.1...v7.1.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-01-24 06:29:50 +09:00
dependabot-preview[bot]
2550d0ecb0 deps: bump @types/jest from 24.9.0 to 24.9.1
Bumps [@types/jest](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/jest) from 24.9.0 to 24.9.1.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/jest)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-01-23 21:25:32 +00:00
dependabot-preview[bot]
692ded2284 deps: bump @typescript-eslint/parser from 2.16.0 to 2.17.0 (#144)
Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 2.16.0 to 2.17.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v2.17.0/packages/parser)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-01-24 06:21:03 +09:00
dependabot-preview[bot]
e9732216ce deps: bump husky from 4.0.10 to 4.2.1
Bumps [husky](https://github.com/typicode/husky) from 4.0.10 to 4.2.1.
- [Release notes](https://github.com/typicode/husky/releases)
- [Changelog](https://github.com/typicode/husky/blob/master/CHANGELOG.md)
- [Commits](https://github.com/typicode/husky/compare/v4.0.10...v4.2.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-01-23 21:17:16 +00:00
dependabot-preview[bot]
3315ca857b deps: bump jest and ts-jest
Bumps [jest](https://github.com/facebook/jest) and [ts-jest](https://github.com/kulshekhar/ts-jest). These dependencies needed to be updated together.

Updates `jest` from 24.9.0 to 25.1.0
- [Release notes](https://github.com/facebook/jest/releases)
- [Changelog](https://github.com/facebook/jest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/facebook/jest/compare/v24.9.0...v25.1.0)

Updates `ts-jest` from 24.3.0 to 25.0.0
- [Release notes](https://github.com/kulshekhar/ts-jest/releases)
- [Changelog](https://github.com/kulshekhar/ts-jest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/kulshekhar/ts-jest/compare/v24.3.0...v25.0.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-01-23 21:12:39 +00:00
dependabot-preview[bot]
8d85402748 deps: bump @types/node from 13.1.8 to 13.5.0
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 13.1.8 to 13.5.0.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-01-23 21:06:26 +00:00
dependabot-preview[bot]
b4a0e8ba60 deps: bump jest-circus from 24.9.0 to 25.1.0
Bumps [jest-circus](https://github.com/facebook/jest/tree/HEAD/packages/jest-circus) from 24.9.0 to 25.1.0.
- [Release notes](https://github.com/facebook/jest/releases)
- [Changelog](https://github.com/facebook/jest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/facebook/jest/commits/v25.1.0/packages/jest-circus)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-01-23 20:58:36 +00:00
dependabot-preview[bot]
66d664bedd deps: bump @typescript-eslint/eslint-plugin from 2.16.0 to 2.17.0
Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 2.16.0 to 2.17.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v2.17.0/packages/eslint-plugin)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-01-23 20:54:20 +00:00
dependabot-preview[bot]
87e38e224d deps: bump lint-staged from 10.0.0 to 10.0.2
Bumps [lint-staged](https://github.com/okonet/lint-staged) from 10.0.0 to 10.0.2.
- [Release notes](https://github.com/okonet/lint-staged/releases)
- [Commits](https://github.com/okonet/lint-staged/compare/v10.0.0...v10.0.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-01-23 20:50:09 +00:00
Shohei Ueda
4fb2901627 style: remove extra whitespace [skip ci] 2020-01-24 00:20:16 +09:00
Shohei Ueda
7a50ddc694 ci: Add Hugo version dump step 2020-01-24 00:17:39 +09:00
Shohei Ueda
b55f1c81fb test: Add fail to fetch latest due to 404 (#137) 2020-01-21 01:35:00 +09:00
Shohei Ueda
0311892edd docs: Add Codecov badge
docs: Remove Coveralls badge
2020-01-21 01:08:43 +09:00
Shohei Ueda
94ce32ea1b ci: Add codecov/codecov-action@v1 (#136)
ci: Comment out coverallsapp/github-action@v1.0.1
2020-01-21 01:04:46 +09:00
peaceiris
3317963a65 deps: update 2020-01-20 05:09:09 +09:00
Shohei Ueda
a79f520add docs: Update action execution time 2020-01-19 16:35:39 +09:00
Shohei Ueda
b6a7551978 ci: Add operations-per-run 1 2020-01-19 15:37:28 +09:00
peaceiris
490ff3b995 chore(release): Remove build assets [skip ci] 2020-01-18 12:36:55 +09:00
10 changed files with 5431 additions and 2213 deletions

View File

@@ -15,3 +15,4 @@ jobs:
stale-pr-message: 'This pull request is stale because it has been open 21 days with no activity. Remove stale label or comment or this will be closed in 7 days.'
days-before-stale: 21
days-before-close: 7
operations-per-run: 1

View File

@@ -30,4 +30,9 @@ jobs:
hugo-version: ${{ matrix.hugo-version }}
extended: ${{ matrix.extended }}
- run: hugo version
- name: Run hugo version
run: echo "::set-output name=hugo_version::$(hugo version)"
id: hugo_version
- name: '${{ steps.hugo_version.outputs.hugo_version }}'
run: echo '${{ steps.hugo_version.outputs.hugo_version }}'

View File

@@ -76,14 +76,18 @@ jobs:
name: coverage
path: coverage
- name: Upload test coverage to Coveralls
uses: coverallsapp/github-action@v1.0.1
- uses: codecov/codecov-action@v1
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
parallel: true
token: ${{ secrets.CODECOV_TOKEN }}
- name: Coveralls Finished
uses: coverallsapp/github-action@v1.0.1
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
parallel-finished: true
# - name: Upload test coverage to Coveralls
# uses: coverallsapp/github-action@v1.0.1
# with:
# github-token: ${{ secrets.GITHUB_TOKEN }}
# parallel: true
# - name: Coveralls Finished
# uses: coverallsapp/github-action@v1.0.1
# with:
# github-token: ${{ secrets.GITHUB_TOKEN }}
# parallel-finished: true

View File

@@ -2,6 +2,43 @@
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
## [2.4.2](https://github.com/peaceiris/actions-hugo/compare/v2.4.1...v2.4.2) (2020-01-23)
### ci
* Add codecov/codecov-action@v1 (#136) ([94ce32e](https://github.com/peaceiris/actions-hugo/commit/94ce32ea1b2965037ef7bbec618476ed6ad7b9e6)), closes [#136](https://github.com/peaceiris/actions-hugo/issues/136)
* Add Hugo version dump step ([7a50ddc](https://github.com/peaceiris/actions-hugo/commit/7a50ddc6941e49c88a35080315a84a684c825347))
* Add operations-per-run 1 ([b6a7551](https://github.com/peaceiris/actions-hugo/commit/b6a75519788da01712462416009e656ec0b9cc8d))
### deps
* bump @types/jest from 24.9.0 to 24.9.1 ([2550d0e](https://github.com/peaceiris/actions-hugo/commit/2550d0ecb023988fa8061c6270a46e9d67bb84dc))
* bump @types/node from 13.1.8 to 13.5.0 ([8d85402](https://github.com/peaceiris/actions-hugo/commit/8d854027489e6b4b9130701c3a826185aca6bfae))
* bump @typescript-eslint/eslint-plugin from 2.16.0 to 2.17.0 ([66d664b](https://github.com/peaceiris/actions-hugo/commit/66d664bedd9b4a5d5004dc4023557305c4d69d97))
* bump @typescript-eslint/parser from 2.16.0 to 2.17.0 (#144) ([692ded2](https://github.com/peaceiris/actions-hugo/commit/692ded22845285c58250414c6389365f01229c49)), closes [#144](https://github.com/peaceiris/actions-hugo/issues/144)
* bump husky from 4.0.10 to 4.2.1 ([e973221](https://github.com/peaceiris/actions-hugo/commit/e9732216ceb5db53dac31f61b0bb7d03db346f3a))
* bump jest and ts-jest ([3315ca8](https://github.com/peaceiris/actions-hugo/commit/3315ca857b7ee10f6c9de622898e44583fd81132))
* bump jest-circus from 24.9.0 to 25.1.0 ([b4a0e8b](https://github.com/peaceiris/actions-hugo/commit/b4a0e8ba604f9aeccee1f7b409870b3605de8544))
* bump lint-staged from 10.0.0 to 10.0.2 ([87e38e2](https://github.com/peaceiris/actions-hugo/commit/87e38e224d4a8f50a19dc9904c0bb85f707197bd))
* bump standard-version from 7.0.1 to 7.1.0 (#145) ([699805b](https://github.com/peaceiris/actions-hugo/commit/699805b6e156fb30665896aa7c1cbbca130a1364)), closes [#145](https://github.com/peaceiris/actions-hugo/issues/145)
* update ([3317963](https://github.com/peaceiris/actions-hugo/commit/3317963a656646a401fcf4d1420b50f5908e3be0))
### docs
* Add Codecov badge ([0311892](https://github.com/peaceiris/actions-hugo/commit/0311892edd4e91aac6a95a003243e44ad3a54fe0))
* Update action execution time ([a79f520](https://github.com/peaceiris/actions-hugo/commit/a79f520addd8c317fcb9b29e8ecc4a8b0ecc43ae))
### style
* remove extra whitespace [skip ci] ([4fb2901](https://github.com/peaceiris/actions-hugo/commit/4fb290162762a7f823fcab1984966da8d8aed547))
### test
* Add fail to fetch latest due to 404 (#137) ([b55f1c8](https://github.com/peaceiris/actions-hugo/commit/b55f1c81fb24bc6149b3a7ec4cb9aa6c9596e877)), closes [#137](https://github.com/peaceiris/actions-hugo/issues/137)
## [2.4.1](https://github.com/peaceiris/actions-hugo/compare/v2.4.0...v2.4.1) (2020-01-18)

View File

@@ -3,7 +3,7 @@
[![GitHub release date](https://img.shields.io/github/release-date/peaceiris/actions-hugo.svg)](https://github.com/peaceiris/actions-hugo/releases)
![GitHub Actions status](https://github.com/peaceiris/actions-hugo/workflows/Test/badge.svg)
[![CodeFactor](https://www.codefactor.io/repository/github/peaceiris/actions-hugo/badge)](https://www.codefactor.io/repository/github/peaceiris/actions-hugo)
[![Coverage Status](https://coveralls.io/repos/github/peaceiris/actions-hugo/badge.svg?branch=master)](https://coveralls.io/github/peaceiris/actions-hugo?branch=master)
[![codecov](https://codecov.io/gh/peaceiris/actions-hugo/branch/master/graph/badge.svg)](https://codecov.io/gh/peaceiris/actions-hugo)
<img width="400" alt="GitHub Actions for Hugo" src="./images/ogp.svg">
@@ -18,7 +18,7 @@ This **Hugo Setup Action** can install **Hugo** to a virtual machine of **GitHub
From `v2`, this Hugo Setup Action has migrated to a JavaScript (TypeScript) action.
We no longer build or pull a Hugo docker image.
Thanks to this change, we can complete this action less than **1 sec**.
Thanks to this change, we can complete this action in less than a few seconds.
(A docker base action was taking about 1 min or more execution time to build and pull a docker image.)
| OS (runs-on) | ubuntu-18.04 | macos-latest | windows-2019 |

View File

@@ -3,25 +3,23 @@ import * as io from '@actions/io';
import path from 'path';
import nock from 'nock';
import {Tool, Action} from '../src/constants';
// import {FetchError} from 'node-fetch';
import {FetchError} from 'node-fetch';
import jsonTestBrew from './data/brew.json';
// import jsonTestGithub from './data/github.json';
jest.setTimeout(30000);
beforeEach(() => {
jest.resetModules();
});
afterEach(() => {
delete process.env['INPUT_HUGO-VERSION'];
nock.cleanAll();
});
describe('Integration testing run()', () => {
beforeEach(() => {
jest.resetModules();
});
afterEach(async () => {
const workDir = path.join(`${process.env.HOME}`, Action.WorkDirName);
await io.rmRF(workDir);
delete process.env['INPUT_HUGO-VERSION'];
nock.cleanAll();
});
test('succeed in installing a custom version', async () => {
@@ -69,6 +67,15 @@ describe('Integration testing run()', () => {
);
expect(result.output).toMatch(`extended`);
});
test('fail to install the latest version due to 404 of brew', async () => {
process.env['INPUT_HUGO-VERSION'] = 'latest';
nock('https://formulae.brew.sh')
.get(`/api/formula/${Tool.Repo}.json`)
.reply(404);
await expect(main.run()).rejects.toThrowError(FetchError);
});
});
describe('showVersion()', () => {

View File

@@ -1026,7 +1026,7 @@ function run() {
}
catch (e) {
core.setFailed(`Action failed with error ${e}`);
return e;
throw e;
}
});
}

7519
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -1,6 +1,6 @@
{
"name": "hugo-action",
"version": "2.4.1",
"version": "2.4.2",
"description": "GitHub Actions for Hugo",
"main": "lib/index.js",
"scripts": {
@@ -25,8 +25,7 @@
"src/**/*.ts": [
"prettier --check",
"eslint",
"jest --bail --findRelatedTests",
"git add"
"jest --bail --findRelatedTests"
]
},
"repository": {
@@ -55,22 +54,22 @@
"node-fetch": "^2.6.0"
},
"devDependencies": {
"@types/jest": "^24.9.0",
"@types/node": "^13.1.7",
"@types/jest": "^24.9.1",
"@types/node": "^13.5.0",
"@types/node-fetch": "^2.5.4",
"@typescript-eslint/eslint-plugin": "^2.16.0",
"@typescript-eslint/parser": "^2.16.0",
"@typescript-eslint/eslint-plugin": "^2.17.0",
"@typescript-eslint/parser": "^2.17.0",
"@zeit/ncc": "^0.21.0",
"eslint": "^6.8.0",
"eslint-plugin-jest": "^23.6.0",
"husky": "^4.0.10",
"jest": "^24.9.0",
"jest-circus": "^24.9.0",
"lint-staged": "^9.5.0",
"husky": "^4.2.1",
"jest": "^25.1.0",
"jest-circus": "^25.1.0",
"lint-staged": "^10.0.2",
"nock": "^11.7.2",
"prettier": "1.19.1",
"standard-version": "^7.0.1",
"ts-jest": "^24.3.0",
"standard-version": "^7.1.0",
"ts-jest": "^25.0.0",
"typescript": "^3.7.5"
}
}

View File

@@ -56,6 +56,6 @@ export async function run(): Promise<ActionResult> {
return result;
} catch (e) {
core.setFailed(`Action failed with error ${e}`);
return e;
throw e;
}
}