test: Add integration testing (#131)

* docs: Update description
* deps: Add nock
* chore: Add resolveJsonModule
* test: Add integration testing
* chore: Add @typescript-eslint/eslint-plugin
* refactor: Fix lint errors
* chore: Add eslint-plugin-jest
* refactor: Fix lint errors
* test: Add remove working files
* ci: Comment out cache steps
This commit is contained in:
Shohei Ueda
2020-01-18 10:29:06 +09:00
committed by GitHub
parent 477d977a96
commit 386980e22b
16 changed files with 1249 additions and 96 deletions

1
__tests__/data/brew.json Normal file
View File

@@ -0,0 +1 @@
{"name":"hugo","full_name":"hugo","oldname":null,"aliases":[],"versioned_formulae":[],"desc":"Configurable static site generator","homepage":"https://gohugo.io/","versions":{"stable":"0.62.2","devel":null,"head":"HEAD","bottle":true},"revision":0,"version_scheme":0,"bottle":{"stable":{"rebuild":0,"cellar":":any_skip_relocation","prefix":"/usr/local","root_url":"https://homebrew.bintray.com/bottles","files":{"catalina":{"url":"https://homebrew.bintray.com/bottles/hugo-0.62.2.catalina.bottle.tar.gz","sha256":"354545c2c125e01a8860f83577fb4218d585fa8d38cd7f51e4228a149347fbcf"},"mojave":{"url":"https://homebrew.bintray.com/bottles/hugo-0.62.2.mojave.bottle.tar.gz","sha256":"9645b64fe6290c4c3b7591ef21139247f0fad6e49da1edd01665b3130a8f1d1a"},"high_sierra":{"url":"https://homebrew.bintray.com/bottles/hugo-0.62.2.high_sierra.bottle.tar.gz","sha256":"0ede4cbcc7536dd6b05107376637840356062273d734b4106be98b3d1732d50c"}}}},"keg_only":false,"bottle_disabled":false,"options":[],"build_dependencies":["go"],"dependencies":[],"recommended_dependencies":[],"optional_dependencies":[],"uses_from_macos":[],"requirements":[],"conflicts_with":[],"caveats":null,"installed":[],"linked_keg":null,"pinned":false,"outdated":false,"analytics":{"install":{"30d":{"hugo":24278,"hugo --HEAD":30},"90d":{"hugo":68639,"hugo --HEAD":80},"365d":{"hugo":223748,"hugo --HEAD":321}},"install_on_request":{"30d":{"hugo":23621,"hugo --HEAD":27},"90d":{"hugo":66676,"hugo --HEAD":74},"365d":{"hugo":215985,"hugo --HEAD":305}},"build_error":{"30d":{"hugo":0}}}}

958
__tests__/data/github.json Normal file
View File

@@ -0,0 +1,958 @@
{
"url": "https://api.github.com/repos/gohugoio/hugo/releases/22603992",
"assets_url": "https://api.github.com/repos/gohugoio/hugo/releases/22603992/assets",
"upload_url": "https://uploads.github.com/repos/gohugoio/hugo/releases/22603992/assets{?name,label}",
"html_url": "https://github.com/gohugoio/hugo/releases/tag/v0.62.2",
"id": 22603992,
"node_id": "MDc6UmVsZWFzZTIyNjAzOTky",
"tag_name": "v0.62.2",
"target_commitish": "master",
"name": "v0.62.2",
"draft": false,
"author": {
"login": "bep",
"id": 394382,
"node_id": "MDQ6VXNlcjM5NDM4Mg==",
"avatar_url": "https://avatars1.githubusercontent.com/u/394382?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/bep",
"html_url": "https://github.com/bep",
"followers_url": "https://api.github.com/users/bep/followers",
"following_url": "https://api.github.com/users/bep/following{/other_user}",
"gists_url": "https://api.github.com/users/bep/gists{/gist_id}",
"starred_url": "https://api.github.com/users/bep/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/bep/subscriptions",
"organizations_url": "https://api.github.com/users/bep/orgs",
"repos_url": "https://api.github.com/users/bep/repos",
"events_url": "https://api.github.com/users/bep/events{/privacy}",
"received_events_url": "https://api.github.com/users/bep/received_events",
"type": "User",
"site_admin": false
},
"prerelease": false,
"created_at": "2020-01-05T18:50:35Z",
"published_at": "2020-01-05T19:35:16Z",
"assets": [
{
"url": "https://api.github.com/repos/gohugoio/hugo/releases/assets/17152845",
"id": 17152845,
"node_id": "MDEyOlJlbGVhc2VBc3NldDE3MTUyODQ1",
"name": "hugo_0.62.2_checksums.txt",
"label": "",
"uploader": {
"login": "bep",
"id": 394382,
"node_id": "MDQ6VXNlcjM5NDM4Mg==",
"avatar_url": "https://avatars1.githubusercontent.com/u/394382?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/bep",
"html_url": "https://github.com/bep",
"followers_url": "https://api.github.com/users/bep/followers",
"following_url": "https://api.github.com/users/bep/following{/other_user}",
"gists_url": "https://api.github.com/users/bep/gists{/gist_id}",
"starred_url": "https://api.github.com/users/bep/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/bep/subscriptions",
"organizations_url": "https://api.github.com/users/bep/orgs",
"repos_url": "https://api.github.com/users/bep/repos",
"events_url": "https://api.github.com/users/bep/events{/privacy}",
"received_events_url": "https://api.github.com/users/bep/received_events",
"type": "User",
"site_admin": false
},
"content_type": "text/plain; charset=utf-8",
"state": "uploaded",
"size": 2552,
"download_count": 328,
"created_at": "2020-01-05T18:58:47Z",
"updated_at": "2020-01-05T18:58:47Z",
"browser_download_url": "https://github.com/gohugoio/hugo/releases/download/v0.62.2/hugo_0.62.2_checksums.txt"
},
{
"url": "https://api.github.com/repos/gohugoio/hugo/releases/assets/17152874",
"id": 17152874,
"node_id": "MDEyOlJlbGVhc2VBc3NldDE3MTUyODc0",
"name": "hugo_0.62.2_DragonFlyBSD-64bit.tar.gz",
"label": "",
"uploader": {
"login": "bep",
"id": 394382,
"node_id": "MDQ6VXNlcjM5NDM4Mg==",
"avatar_url": "https://avatars1.githubusercontent.com/u/394382?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/bep",
"html_url": "https://github.com/bep",
"followers_url": "https://api.github.com/users/bep/followers",
"following_url": "https://api.github.com/users/bep/following{/other_user}",
"gists_url": "https://api.github.com/users/bep/gists{/gist_id}",
"starred_url": "https://api.github.com/users/bep/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/bep/subscriptions",
"organizations_url": "https://api.github.com/users/bep/orgs",
"repos_url": "https://api.github.com/users/bep/repos",
"events_url": "https://api.github.com/users/bep/events{/privacy}",
"received_events_url": "https://api.github.com/users/bep/received_events",
"type": "User",
"site_admin": false
},
"content_type": "application/gzip",
"state": "uploaded",
"size": 13188250,
"download_count": 25,
"created_at": "2020-01-05T18:58:52Z",
"updated_at": "2020-01-05T18:58:52Z",
"browser_download_url": "https://github.com/gohugoio/hugo/releases/download/v0.62.2/hugo_0.62.2_DragonFlyBSD-64bit.tar.gz"
},
{
"url": "https://api.github.com/repos/gohugoio/hugo/releases/assets/17152867",
"id": 17152867,
"node_id": "MDEyOlJlbGVhc2VBc3NldDE3MTUyODY3",
"name": "hugo_0.62.2_FreeBSD-32bit.tar.gz",
"label": "",
"uploader": {
"login": "bep",
"id": 394382,
"node_id": "MDQ6VXNlcjM5NDM4Mg==",
"avatar_url": "https://avatars1.githubusercontent.com/u/394382?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/bep",
"html_url": "https://github.com/bep",
"followers_url": "https://api.github.com/users/bep/followers",
"following_url": "https://api.github.com/users/bep/following{/other_user}",
"gists_url": "https://api.github.com/users/bep/gists{/gist_id}",
"starred_url": "https://api.github.com/users/bep/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/bep/subscriptions",
"organizations_url": "https://api.github.com/users/bep/orgs",
"repos_url": "https://api.github.com/users/bep/repos",
"events_url": "https://api.github.com/users/bep/events{/privacy}",
"received_events_url": "https://api.github.com/users/bep/received_events",
"type": "User",
"site_admin": false
},
"content_type": "application/gzip",
"state": "uploaded",
"size": 12223449,
"download_count": 10,
"created_at": "2020-01-05T18:58:50Z",
"updated_at": "2020-01-05T18:58:53Z",
"browser_download_url": "https://github.com/gohugoio/hugo/releases/download/v0.62.2/hugo_0.62.2_FreeBSD-32bit.tar.gz"
},
{
"url": "https://api.github.com/repos/gohugoio/hugo/releases/assets/17152850",
"id": 17152850,
"node_id": "MDEyOlJlbGVhc2VBc3NldDE3MTUyODUw",
"name": "hugo_0.62.2_FreeBSD-64bit.tar.gz",
"label": "",
"uploader": {
"login": "bep",
"id": 394382,
"node_id": "MDQ6VXNlcjM5NDM4Mg==",
"avatar_url": "https://avatars1.githubusercontent.com/u/394382?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/bep",
"html_url": "https://github.com/bep",
"followers_url": "https://api.github.com/users/bep/followers",
"following_url": "https://api.github.com/users/bep/following{/other_user}",
"gists_url": "https://api.github.com/users/bep/gists{/gist_id}",
"starred_url": "https://api.github.com/users/bep/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/bep/subscriptions",
"organizations_url": "https://api.github.com/users/bep/orgs",
"repos_url": "https://api.github.com/users/bep/repos",
"events_url": "https://api.github.com/users/bep/events{/privacy}",
"received_events_url": "https://api.github.com/users/bep/received_events",
"type": "User",
"site_admin": false
},
"content_type": "application/gzip",
"state": "uploaded",
"size": 13195767,
"download_count": 38,
"created_at": "2020-01-05T18:58:47Z",
"updated_at": "2020-01-05T18:58:48Z",
"browser_download_url": "https://github.com/gohugoio/hugo/releases/download/v0.62.2/hugo_0.62.2_FreeBSD-64bit.tar.gz"
},
{
"url": "https://api.github.com/repos/gohugoio/hugo/releases/assets/17152869",
"id": 17152869,
"node_id": "MDEyOlJlbGVhc2VBc3NldDE3MTUyODY5",
"name": "hugo_0.62.2_FreeBSD-ARM.tar.gz",
"label": "",
"uploader": {
"login": "bep",
"id": 394382,
"node_id": "MDQ6VXNlcjM5NDM4Mg==",
"avatar_url": "https://avatars1.githubusercontent.com/u/394382?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/bep",
"html_url": "https://github.com/bep",
"followers_url": "https://api.github.com/users/bep/followers",
"following_url": "https://api.github.com/users/bep/following{/other_user}",
"gists_url": "https://api.github.com/users/bep/gists{/gist_id}",
"starred_url": "https://api.github.com/users/bep/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/bep/subscriptions",
"organizations_url": "https://api.github.com/users/bep/orgs",
"repos_url": "https://api.github.com/users/bep/repos",
"events_url": "https://api.github.com/users/bep/events{/privacy}",
"received_events_url": "https://api.github.com/users/bep/received_events",
"type": "User",
"site_admin": false
},
"content_type": "application/gzip",
"state": "uploaded",
"size": 12336796,
"download_count": 12,
"created_at": "2020-01-05T18:58:50Z",
"updated_at": "2020-01-05T18:58:51Z",
"browser_download_url": "https://github.com/gohugoio/hugo/releases/download/v0.62.2/hugo_0.62.2_FreeBSD-ARM.tar.gz"
},
{
"url": "https://api.github.com/repos/gohugoio/hugo/releases/assets/17152855",
"id": 17152855,
"node_id": "MDEyOlJlbGVhc2VBc3NldDE3MTUyODU1",
"name": "hugo_0.62.2_Linux-32bit.deb",
"label": "",
"uploader": {
"login": "bep",
"id": 394382,
"node_id": "MDQ6VXNlcjM5NDM4Mg==",
"avatar_url": "https://avatars1.githubusercontent.com/u/394382?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/bep",
"html_url": "https://github.com/bep",
"followers_url": "https://api.github.com/users/bep/followers",
"following_url": "https://api.github.com/users/bep/following{/other_user}",
"gists_url": "https://api.github.com/users/bep/gists{/gist_id}",
"starred_url": "https://api.github.com/users/bep/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/bep/subscriptions",
"organizations_url": "https://api.github.com/users/bep/orgs",
"repos_url": "https://api.github.com/users/bep/repos",
"events_url": "https://api.github.com/users/bep/events{/privacy}",
"received_events_url": "https://api.github.com/users/bep/received_events",
"type": "User",
"site_admin": false
},
"content_type": "application/x-debian-package",
"state": "uploaded",
"size": 12226680,
"download_count": 37,
"created_at": "2020-01-05T18:58:48Z",
"updated_at": "2020-01-05T18:58:55Z",
"browser_download_url": "https://github.com/gohugoio/hugo/releases/download/v0.62.2/hugo_0.62.2_Linux-32bit.deb"
},
{
"url": "https://api.github.com/repos/gohugoio/hugo/releases/assets/17152849",
"id": 17152849,
"node_id": "MDEyOlJlbGVhc2VBc3NldDE3MTUyODQ5",
"name": "hugo_0.62.2_Linux-32bit.tar.gz",
"label": "",
"uploader": {
"login": "bep",
"id": 394382,
"node_id": "MDQ6VXNlcjM5NDM4Mg==",
"avatar_url": "https://avatars1.githubusercontent.com/u/394382?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/bep",
"html_url": "https://github.com/bep",
"followers_url": "https://api.github.com/users/bep/followers",
"following_url": "https://api.github.com/users/bep/following{/other_user}",
"gists_url": "https://api.github.com/users/bep/gists{/gist_id}",
"starred_url": "https://api.github.com/users/bep/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/bep/subscriptions",
"organizations_url": "https://api.github.com/users/bep/orgs",
"repos_url": "https://api.github.com/users/bep/repos",
"events_url": "https://api.github.com/users/bep/events{/privacy}",
"received_events_url": "https://api.github.com/users/bep/received_events",
"type": "User",
"site_admin": false
},
"content_type": "application/gzip",
"state": "uploaded",
"size": 12228575,
"download_count": 31,
"created_at": "2020-01-05T18:58:47Z",
"updated_at": "2020-01-05T18:58:48Z",
"browser_download_url": "https://github.com/gohugoio/hugo/releases/download/v0.62.2/hugo_0.62.2_Linux-32bit.tar.gz"
},
{
"url": "https://api.github.com/repos/gohugoio/hugo/releases/assets/17152858",
"id": 17152858,
"node_id": "MDEyOlJlbGVhc2VBc3NldDE3MTUyODU4",
"name": "hugo_0.62.2_Linux-64bit.deb",
"label": "",
"uploader": {
"login": "bep",
"id": 394382,
"node_id": "MDQ6VXNlcjM5NDM4Mg==",
"avatar_url": "https://avatars1.githubusercontent.com/u/394382?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/bep",
"html_url": "https://github.com/bep",
"followers_url": "https://api.github.com/users/bep/followers",
"following_url": "https://api.github.com/users/bep/following{/other_user}",
"gists_url": "https://api.github.com/users/bep/gists{/gist_id}",
"starred_url": "https://api.github.com/users/bep/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/bep/subscriptions",
"organizations_url": "https://api.github.com/users/bep/orgs",
"repos_url": "https://api.github.com/users/bep/repos",
"events_url": "https://api.github.com/users/bep/events{/privacy}",
"received_events_url": "https://api.github.com/users/bep/received_events",
"type": "User",
"site_admin": false
},
"content_type": "application/x-debian-package",
"state": "uploaded",
"size": 13182646,
"download_count": 2260,
"created_at": "2020-01-05T18:58:49Z",
"updated_at": "2020-01-05T18:58:49Z",
"browser_download_url": "https://github.com/gohugoio/hugo/releases/download/v0.62.2/hugo_0.62.2_Linux-64bit.deb"
},
{
"url": "https://api.github.com/repos/gohugoio/hugo/releases/assets/17152851",
"id": 17152851,
"node_id": "MDEyOlJlbGVhc2VBc3NldDE3MTUyODUx",
"name": "hugo_0.62.2_Linux-64bit.tar.gz",
"label": "",
"uploader": {
"login": "bep",
"id": 394382,
"node_id": "MDQ6VXNlcjM5NDM4Mg==",
"avatar_url": "https://avatars1.githubusercontent.com/u/394382?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/bep",
"html_url": "https://github.com/bep",
"followers_url": "https://api.github.com/users/bep/followers",
"following_url": "https://api.github.com/users/bep/following{/other_user}",
"gists_url": "https://api.github.com/users/bep/gists{/gist_id}",
"starred_url": "https://api.github.com/users/bep/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/bep/subscriptions",
"organizations_url": "https://api.github.com/users/bep/orgs",
"repos_url": "https://api.github.com/users/bep/repos",
"events_url": "https://api.github.com/users/bep/events{/privacy}",
"received_events_url": "https://api.github.com/users/bep/received_events",
"type": "User",
"site_admin": false
},
"content_type": "application/gzip",
"state": "uploaded",
"size": 13192573,
"download_count": 5752,
"created_at": "2020-01-05T18:58:47Z",
"updated_at": "2020-01-05T18:58:48Z",
"browser_download_url": "https://github.com/gohugoio/hugo/releases/download/v0.62.2/hugo_0.62.2_Linux-64bit.tar.gz"
},
{
"url": "https://api.github.com/repos/gohugoio/hugo/releases/assets/17152856",
"id": 17152856,
"node_id": "MDEyOlJlbGVhc2VBc3NldDE3MTUyODU2",
"name": "hugo_0.62.2_Linux-ARM.deb",
"label": "",
"uploader": {
"login": "bep",
"id": 394382,
"node_id": "MDQ6VXNlcjM5NDM4Mg==",
"avatar_url": "https://avatars1.githubusercontent.com/u/394382?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/bep",
"html_url": "https://github.com/bep",
"followers_url": "https://api.github.com/users/bep/followers",
"following_url": "https://api.github.com/users/bep/following{/other_user}",
"gists_url": "https://api.github.com/users/bep/gists{/gist_id}",
"starred_url": "https://api.github.com/users/bep/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/bep/subscriptions",
"organizations_url": "https://api.github.com/users/bep/orgs",
"repos_url": "https://api.github.com/users/bep/repos",
"events_url": "https://api.github.com/users/bep/events{/privacy}",
"received_events_url": "https://api.github.com/users/bep/received_events",
"type": "User",
"site_admin": false
},
"content_type": "application/x-debian-package",
"state": "uploaded",
"size": 12324130,
"download_count": 47,
"created_at": "2020-01-05T18:58:48Z",
"updated_at": "2020-01-05T18:58:49Z",
"browser_download_url": "https://github.com/gohugoio/hugo/releases/download/v0.62.2/hugo_0.62.2_Linux-ARM.deb"
},
{
"url": "https://api.github.com/repos/gohugoio/hugo/releases/assets/17152854",
"id": 17152854,
"node_id": "MDEyOlJlbGVhc2VBc3NldDE3MTUyODU0",
"name": "hugo_0.62.2_Linux-ARM.tar.gz",
"label": "",
"uploader": {
"login": "bep",
"id": 394382,
"node_id": "MDQ6VXNlcjM5NDM4Mg==",
"avatar_url": "https://avatars1.githubusercontent.com/u/394382?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/bep",
"html_url": "https://github.com/bep",
"followers_url": "https://api.github.com/users/bep/followers",
"following_url": "https://api.github.com/users/bep/following{/other_user}",
"gists_url": "https://api.github.com/users/bep/gists{/gist_id}",
"starred_url": "https://api.github.com/users/bep/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/bep/subscriptions",
"organizations_url": "https://api.github.com/users/bep/orgs",
"repos_url": "https://api.github.com/users/bep/repos",
"events_url": "https://api.github.com/users/bep/events{/privacy}",
"received_events_url": "https://api.github.com/users/bep/received_events",
"type": "User",
"site_admin": false
},
"content_type": "application/gzip",
"state": "uploaded",
"size": 12330563,
"download_count": 35,
"created_at": "2020-01-05T18:58:48Z",
"updated_at": "2020-01-05T18:58:48Z",
"browser_download_url": "https://github.com/gohugoio/hugo/releases/download/v0.62.2/hugo_0.62.2_Linux-ARM.tar.gz"
},
{
"url": "https://api.github.com/repos/gohugoio/hugo/releases/assets/17152857",
"id": 17152857,
"node_id": "MDEyOlJlbGVhc2VBc3NldDE3MTUyODU3",
"name": "hugo_0.62.2_Linux-ARM64.deb",
"label": "",
"uploader": {
"login": "bep",
"id": 394382,
"node_id": "MDQ6VXNlcjM5NDM4Mg==",
"avatar_url": "https://avatars1.githubusercontent.com/u/394382?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/bep",
"html_url": "https://github.com/bep",
"followers_url": "https://api.github.com/users/bep/followers",
"following_url": "https://api.github.com/users/bep/following{/other_user}",
"gists_url": "https://api.github.com/users/bep/gists{/gist_id}",
"starred_url": "https://api.github.com/users/bep/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/bep/subscriptions",
"organizations_url": "https://api.github.com/users/bep/orgs",
"repos_url": "https://api.github.com/users/bep/repos",
"events_url": "https://api.github.com/users/bep/events{/privacy}",
"received_events_url": "https://api.github.com/users/bep/received_events",
"type": "User",
"site_admin": false
},
"content_type": "application/x-debian-package",
"state": "uploaded",
"size": 12113228,
"download_count": 38,
"created_at": "2020-01-05T18:58:49Z",
"updated_at": "2020-01-05T18:58:49Z",
"browser_download_url": "https://github.com/gohugoio/hugo/releases/download/v0.62.2/hugo_0.62.2_Linux-ARM64.deb"
},
{
"url": "https://api.github.com/repos/gohugoio/hugo/releases/assets/17152843",
"id": 17152843,
"node_id": "MDEyOlJlbGVhc2VBc3NldDE3MTUyODQz",
"name": "hugo_0.62.2_Linux-ARM64.tar.gz",
"label": "",
"uploader": {
"login": "bep",
"id": 394382,
"node_id": "MDQ6VXNlcjM5NDM4Mg==",
"avatar_url": "https://avatars1.githubusercontent.com/u/394382?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/bep",
"html_url": "https://github.com/bep",
"followers_url": "https://api.github.com/users/bep/followers",
"following_url": "https://api.github.com/users/bep/following{/other_user}",
"gists_url": "https://api.github.com/users/bep/gists{/gist_id}",
"starred_url": "https://api.github.com/users/bep/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/bep/subscriptions",
"organizations_url": "https://api.github.com/users/bep/orgs",
"repos_url": "https://api.github.com/users/bep/repos",
"events_url": "https://api.github.com/users/bep/events{/privacy}",
"received_events_url": "https://api.github.com/users/bep/received_events",
"type": "User",
"site_admin": false
},
"content_type": "application/gzip",
"state": "uploaded",
"size": 12119126,
"download_count": 63,
"created_at": "2020-01-05T18:58:47Z",
"updated_at": "2020-01-05T18:58:47Z",
"browser_download_url": "https://github.com/gohugoio/hugo/releases/download/v0.62.2/hugo_0.62.2_Linux-ARM64.tar.gz"
},
{
"url": "https://api.github.com/repos/gohugoio/hugo/releases/assets/17152873",
"id": 17152873,
"node_id": "MDEyOlJlbGVhc2VBc3NldDE3MTUyODcz",
"name": "hugo_0.62.2_macOS-32bit.tar.gz",
"label": "",
"uploader": {
"login": "bep",
"id": 394382,
"node_id": "MDQ6VXNlcjM5NDM4Mg==",
"avatar_url": "https://avatars1.githubusercontent.com/u/394382?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/bep",
"html_url": "https://github.com/bep",
"followers_url": "https://api.github.com/users/bep/followers",
"following_url": "https://api.github.com/users/bep/following{/other_user}",
"gists_url": "https://api.github.com/users/bep/gists{/gist_id}",
"starred_url": "https://api.github.com/users/bep/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/bep/subscriptions",
"organizations_url": "https://api.github.com/users/bep/orgs",
"repos_url": "https://api.github.com/users/bep/repos",
"events_url": "https://api.github.com/users/bep/events{/privacy}",
"received_events_url": "https://api.github.com/users/bep/received_events",
"type": "User",
"site_admin": false
},
"content_type": "application/gzip",
"state": "uploaded",
"size": 12805086,
"download_count": 25,
"created_at": "2020-01-05T18:58:52Z",
"updated_at": "2020-01-05T18:58:52Z",
"browser_download_url": "https://github.com/gohugoio/hugo/releases/download/v0.62.2/hugo_0.62.2_macOS-32bit.tar.gz"
},
{
"url": "https://api.github.com/repos/gohugoio/hugo/releases/assets/17152868",
"id": 17152868,
"node_id": "MDEyOlJlbGVhc2VBc3NldDE3MTUyODY4",
"name": "hugo_0.62.2_macOS-64bit.tar.gz",
"label": "",
"uploader": {
"login": "bep",
"id": 394382,
"node_id": "MDQ6VXNlcjM5NDM4Mg==",
"avatar_url": "https://avatars1.githubusercontent.com/u/394382?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/bep",
"html_url": "https://github.com/bep",
"followers_url": "https://api.github.com/users/bep/followers",
"following_url": "https://api.github.com/users/bep/following{/other_user}",
"gists_url": "https://api.github.com/users/bep/gists{/gist_id}",
"starred_url": "https://api.github.com/users/bep/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/bep/subscriptions",
"organizations_url": "https://api.github.com/users/bep/orgs",
"repos_url": "https://api.github.com/users/bep/repos",
"events_url": "https://api.github.com/users/bep/events{/privacy}",
"received_events_url": "https://api.github.com/users/bep/received_events",
"type": "User",
"site_admin": false
},
"content_type": "application/gzip",
"state": "uploaded",
"size": 13765882,
"download_count": 479,
"created_at": "2020-01-05T18:58:50Z",
"updated_at": "2020-01-05T18:58:51Z",
"browser_download_url": "https://github.com/gohugoio/hugo/releases/download/v0.62.2/hugo_0.62.2_macOS-64bit.tar.gz"
},
{
"url": "https://api.github.com/repos/gohugoio/hugo/releases/assets/17152846",
"id": 17152846,
"node_id": "MDEyOlJlbGVhc2VBc3NldDE3MTUyODQ2",
"name": "hugo_0.62.2_NetBSD-32bit.tar.gz",
"label": "",
"uploader": {
"login": "bep",
"id": 394382,
"node_id": "MDQ6VXNlcjM5NDM4Mg==",
"avatar_url": "https://avatars1.githubusercontent.com/u/394382?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/bep",
"html_url": "https://github.com/bep",
"followers_url": "https://api.github.com/users/bep/followers",
"following_url": "https://api.github.com/users/bep/following{/other_user}",
"gists_url": "https://api.github.com/users/bep/gists{/gist_id}",
"starred_url": "https://api.github.com/users/bep/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/bep/subscriptions",
"organizations_url": "https://api.github.com/users/bep/orgs",
"repos_url": "https://api.github.com/users/bep/repos",
"events_url": "https://api.github.com/users/bep/events{/privacy}",
"received_events_url": "https://api.github.com/users/bep/received_events",
"type": "User",
"site_admin": false
},
"content_type": "application/gzip",
"state": "uploaded",
"size": 12206852,
"download_count": 8,
"created_at": "2020-01-05T18:58:47Z",
"updated_at": "2020-01-05T18:58:47Z",
"browser_download_url": "https://github.com/gohugoio/hugo/releases/download/v0.62.2/hugo_0.62.2_NetBSD-32bit.tar.gz"
},
{
"url": "https://api.github.com/repos/gohugoio/hugo/releases/assets/17152863",
"id": 17152863,
"node_id": "MDEyOlJlbGVhc2VBc3NldDE3MTUyODYz",
"name": "hugo_0.62.2_NetBSD-64bit.tar.gz",
"label": "",
"uploader": {
"login": "bep",
"id": 394382,
"node_id": "MDQ6VXNlcjM5NDM4Mg==",
"avatar_url": "https://avatars1.githubusercontent.com/u/394382?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/bep",
"html_url": "https://github.com/bep",
"followers_url": "https://api.github.com/users/bep/followers",
"following_url": "https://api.github.com/users/bep/following{/other_user}",
"gists_url": "https://api.github.com/users/bep/gists{/gist_id}",
"starred_url": "https://api.github.com/users/bep/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/bep/subscriptions",
"organizations_url": "https://api.github.com/users/bep/orgs",
"repos_url": "https://api.github.com/users/bep/repos",
"events_url": "https://api.github.com/users/bep/events{/privacy}",
"received_events_url": "https://api.github.com/users/bep/received_events",
"type": "User",
"site_admin": false
},
"content_type": "application/gzip",
"state": "uploaded",
"size": 13186059,
"download_count": 12,
"created_at": "2020-01-05T18:58:49Z",
"updated_at": "2020-01-05T18:58:50Z",
"browser_download_url": "https://github.com/gohugoio/hugo/releases/download/v0.62.2/hugo_0.62.2_NetBSD-64bit.tar.gz"
},
{
"url": "https://api.github.com/repos/gohugoio/hugo/releases/assets/17152870",
"id": 17152870,
"node_id": "MDEyOlJlbGVhc2VBc3NldDE3MTUyODcw",
"name": "hugo_0.62.2_NetBSD-ARM.tar.gz",
"label": "",
"uploader": {
"login": "bep",
"id": 394382,
"node_id": "MDQ6VXNlcjM5NDM4Mg==",
"avatar_url": "https://avatars1.githubusercontent.com/u/394382?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/bep",
"html_url": "https://github.com/bep",
"followers_url": "https://api.github.com/users/bep/followers",
"following_url": "https://api.github.com/users/bep/following{/other_user}",
"gists_url": "https://api.github.com/users/bep/gists{/gist_id}",
"starred_url": "https://api.github.com/users/bep/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/bep/subscriptions",
"organizations_url": "https://api.github.com/users/bep/orgs",
"repos_url": "https://api.github.com/users/bep/repos",
"events_url": "https://api.github.com/users/bep/events{/privacy}",
"received_events_url": "https://api.github.com/users/bep/received_events",
"type": "User",
"site_admin": false
},
"content_type": "application/gzip",
"state": "uploaded",
"size": 12325194,
"download_count": 8,
"created_at": "2020-01-05T18:58:51Z",
"updated_at": "2020-01-05T18:58:52Z",
"browser_download_url": "https://github.com/gohugoio/hugo/releases/download/v0.62.2/hugo_0.62.2_NetBSD-ARM.tar.gz"
},
{
"url": "https://api.github.com/repos/gohugoio/hugo/releases/assets/17152861",
"id": 17152861,
"node_id": "MDEyOlJlbGVhc2VBc3NldDE3MTUyODYx",
"name": "hugo_0.62.2_OpenBSD-32bit.tar.gz",
"label": "",
"uploader": {
"login": "bep",
"id": 394382,
"node_id": "MDQ6VXNlcjM5NDM4Mg==",
"avatar_url": "https://avatars1.githubusercontent.com/u/394382?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/bep",
"html_url": "https://github.com/bep",
"followers_url": "https://api.github.com/users/bep/followers",
"following_url": "https://api.github.com/users/bep/following{/other_user}",
"gists_url": "https://api.github.com/users/bep/gists{/gist_id}",
"starred_url": "https://api.github.com/users/bep/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/bep/subscriptions",
"organizations_url": "https://api.github.com/users/bep/orgs",
"repos_url": "https://api.github.com/users/bep/repos",
"events_url": "https://api.github.com/users/bep/events{/privacy}",
"received_events_url": "https://api.github.com/users/bep/received_events",
"type": "User",
"site_admin": false
},
"content_type": "application/gzip",
"state": "uploaded",
"size": 12208022,
"download_count": 11,
"created_at": "2020-01-05T18:58:49Z",
"updated_at": "2020-01-05T18:58:50Z",
"browser_download_url": "https://github.com/gohugoio/hugo/releases/download/v0.62.2/hugo_0.62.2_OpenBSD-32bit.tar.gz"
},
{
"url": "https://api.github.com/repos/gohugoio/hugo/releases/assets/17152871",
"id": 17152871,
"node_id": "MDEyOlJlbGVhc2VBc3NldDE3MTUyODcx",
"name": "hugo_0.62.2_OpenBSD-64bit.tar.gz",
"label": "",
"uploader": {
"login": "bep",
"id": 394382,
"node_id": "MDQ6VXNlcjM5NDM4Mg==",
"avatar_url": "https://avatars1.githubusercontent.com/u/394382?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/bep",
"html_url": "https://github.com/bep",
"followers_url": "https://api.github.com/users/bep/followers",
"following_url": "https://api.github.com/users/bep/following{/other_user}",
"gists_url": "https://api.github.com/users/bep/gists{/gist_id}",
"starred_url": "https://api.github.com/users/bep/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/bep/subscriptions",
"organizations_url": "https://api.github.com/users/bep/orgs",
"repos_url": "https://api.github.com/users/bep/repos",
"events_url": "https://api.github.com/users/bep/events{/privacy}",
"received_events_url": "https://api.github.com/users/bep/received_events",
"type": "User",
"site_admin": false
},
"content_type": "application/gzip",
"state": "uploaded",
"size": 13183077,
"download_count": 39,
"created_at": "2020-01-05T18:58:51Z",
"updated_at": "2020-01-05T18:58:52Z",
"browser_download_url": "https://github.com/gohugoio/hugo/releases/download/v0.62.2/hugo_0.62.2_OpenBSD-64bit.tar.gz"
},
{
"url": "https://api.github.com/repos/gohugoio/hugo/releases/assets/17152864",
"id": 17152864,
"node_id": "MDEyOlJlbGVhc2VBc3NldDE3MTUyODY0",
"name": "hugo_0.62.2_OpenBSD-ARM.tar.gz",
"label": "",
"uploader": {
"login": "bep",
"id": 394382,
"node_id": "MDQ6VXNlcjM5NDM4Mg==",
"avatar_url": "https://avatars1.githubusercontent.com/u/394382?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/bep",
"html_url": "https://github.com/bep",
"followers_url": "https://api.github.com/users/bep/followers",
"following_url": "https://api.github.com/users/bep/following{/other_user}",
"gists_url": "https://api.github.com/users/bep/gists{/gist_id}",
"starred_url": "https://api.github.com/users/bep/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/bep/subscriptions",
"organizations_url": "https://api.github.com/users/bep/orgs",
"repos_url": "https://api.github.com/users/bep/repos",
"events_url": "https://api.github.com/users/bep/events{/privacy}",
"received_events_url": "https://api.github.com/users/bep/received_events",
"type": "User",
"site_admin": false
},
"content_type": "application/gzip",
"state": "uploaded",
"size": 12322903,
"download_count": 9,
"created_at": "2020-01-05T18:58:50Z",
"updated_at": "2020-01-05T18:58:50Z",
"browser_download_url": "https://github.com/gohugoio/hugo/releases/download/v0.62.2/hugo_0.62.2_OpenBSD-ARM.tar.gz"
},
{
"url": "https://api.github.com/repos/gohugoio/hugo/releases/assets/17152862",
"id": 17152862,
"node_id": "MDEyOlJlbGVhc2VBc3NldDE3MTUyODYy",
"name": "hugo_0.62.2_Windows-32bit.zip",
"label": "",
"uploader": {
"login": "bep",
"id": 394382,
"node_id": "MDQ6VXNlcjM5NDM4Mg==",
"avatar_url": "https://avatars1.githubusercontent.com/u/394382?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/bep",
"html_url": "https://github.com/bep",
"followers_url": "https://api.github.com/users/bep/followers",
"following_url": "https://api.github.com/users/bep/following{/other_user}",
"gists_url": "https://api.github.com/users/bep/gists{/gist_id}",
"starred_url": "https://api.github.com/users/bep/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/bep/subscriptions",
"organizations_url": "https://api.github.com/users/bep/orgs",
"repos_url": "https://api.github.com/users/bep/repos",
"events_url": "https://api.github.com/users/bep/events{/privacy}",
"received_events_url": "https://api.github.com/users/bep/received_events",
"type": "User",
"site_admin": false
},
"content_type": "application/zip",
"state": "uploaded",
"size": 12221573,
"download_count": 154,
"created_at": "2020-01-05T18:58:49Z",
"updated_at": "2020-01-05T18:58:50Z",
"browser_download_url": "https://github.com/gohugoio/hugo/releases/download/v0.62.2/hugo_0.62.2_Windows-32bit.zip"
},
{
"url": "https://api.github.com/repos/gohugoio/hugo/releases/assets/17152865",
"id": 17152865,
"node_id": "MDEyOlJlbGVhc2VBc3NldDE3MTUyODY1",
"name": "hugo_0.62.2_Windows-64bit.zip",
"label": "",
"uploader": {
"login": "bep",
"id": 394382,
"node_id": "MDQ6VXNlcjM5NDM4Mg==",
"avatar_url": "https://avatars1.githubusercontent.com/u/394382?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/bep",
"html_url": "https://github.com/bep",
"followers_url": "https://api.github.com/users/bep/followers",
"following_url": "https://api.github.com/users/bep/following{/other_user}",
"gists_url": "https://api.github.com/users/bep/gists{/gist_id}",
"starred_url": "https://api.github.com/users/bep/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/bep/subscriptions",
"organizations_url": "https://api.github.com/users/bep/orgs",
"repos_url": "https://api.github.com/users/bep/repos",
"events_url": "https://api.github.com/users/bep/events{/privacy}",
"received_events_url": "https://api.github.com/users/bep/received_events",
"type": "User",
"site_admin": false
},
"content_type": "application/zip",
"state": "uploaded",
"size": 13265631,
"download_count": 7902,
"created_at": "2020-01-05T18:58:50Z",
"updated_at": "2020-01-05T18:58:50Z",
"browser_download_url": "https://github.com/gohugoio/hugo/releases/download/v0.62.2/hugo_0.62.2_Windows-64bit.zip"
},
{
"url": "https://api.github.com/repos/gohugoio/hugo/releases/assets/17152859",
"id": 17152859,
"node_id": "MDEyOlJlbGVhc2VBc3NldDE3MTUyODU5",
"name": "hugo_extended_0.62.2_Linux-64bit.deb",
"label": "",
"uploader": {
"login": "bep",
"id": 394382,
"node_id": "MDQ6VXNlcjM5NDM4Mg==",
"avatar_url": "https://avatars1.githubusercontent.com/u/394382?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/bep",
"html_url": "https://github.com/bep",
"followers_url": "https://api.github.com/users/bep/followers",
"following_url": "https://api.github.com/users/bep/following{/other_user}",
"gists_url": "https://api.github.com/users/bep/gists{/gist_id}",
"starred_url": "https://api.github.com/users/bep/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/bep/subscriptions",
"organizations_url": "https://api.github.com/users/bep/orgs",
"repos_url": "https://api.github.com/users/bep/repos",
"events_url": "https://api.github.com/users/bep/events{/privacy}",
"received_events_url": "https://api.github.com/users/bep/received_events",
"type": "User",
"site_admin": false
},
"content_type": "application/x-debian-package",
"state": "uploaded",
"size": 14137254,
"download_count": 855,
"created_at": "2020-01-05T18:58:49Z",
"updated_at": "2020-01-05T18:58:49Z",
"browser_download_url": "https://github.com/gohugoio/hugo/releases/download/v0.62.2/hugo_extended_0.62.2_Linux-64bit.deb"
},
{
"url": "https://api.github.com/repos/gohugoio/hugo/releases/assets/17152844",
"id": 17152844,
"node_id": "MDEyOlJlbGVhc2VBc3NldDE3MTUyODQ0",
"name": "hugo_extended_0.62.2_Linux-64bit.tar.gz",
"label": "",
"uploader": {
"login": "bep",
"id": 394382,
"node_id": "MDQ6VXNlcjM5NDM4Mg==",
"avatar_url": "https://avatars1.githubusercontent.com/u/394382?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/bep",
"html_url": "https://github.com/bep",
"followers_url": "https://api.github.com/users/bep/followers",
"following_url": "https://api.github.com/users/bep/following{/other_user}",
"gists_url": "https://api.github.com/users/bep/gists{/gist_id}",
"starred_url": "https://api.github.com/users/bep/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/bep/subscriptions",
"organizations_url": "https://api.github.com/users/bep/orgs",
"repos_url": "https://api.github.com/users/bep/repos",
"events_url": "https://api.github.com/users/bep/events{/privacy}",
"received_events_url": "https://api.github.com/users/bep/received_events",
"type": "User",
"site_admin": false
},
"content_type": "application/gzip",
"state": "uploaded",
"size": 14145652,
"download_count": 5218,
"created_at": "2020-01-05T18:58:47Z",
"updated_at": "2020-01-05T18:58:47Z",
"browser_download_url": "https://github.com/gohugoio/hugo/releases/download/v0.62.2/hugo_extended_0.62.2_Linux-64bit.tar.gz"
},
{
"url": "https://api.github.com/repos/gohugoio/hugo/releases/assets/17152852",
"id": 17152852,
"node_id": "MDEyOlJlbGVhc2VBc3NldDE3MTUyODUy",
"name": "hugo_extended_0.62.2_macOS-64bit.tar.gz",
"label": "",
"uploader": {
"login": "bep",
"id": 394382,
"node_id": "MDQ6VXNlcjM5NDM4Mg==",
"avatar_url": "https://avatars1.githubusercontent.com/u/394382?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/bep",
"html_url": "https://github.com/bep",
"followers_url": "https://api.github.com/users/bep/followers",
"following_url": "https://api.github.com/users/bep/following{/other_user}",
"gists_url": "https://api.github.com/users/bep/gists{/gist_id}",
"starred_url": "https://api.github.com/users/bep/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/bep/subscriptions",
"organizations_url": "https://api.github.com/users/bep/orgs",
"repos_url": "https://api.github.com/users/bep/repos",
"events_url": "https://api.github.com/users/bep/events{/privacy}",
"received_events_url": "https://api.github.com/users/bep/received_events",
"type": "User",
"site_admin": false
},
"content_type": "application/gzip",
"state": "uploaded",
"size": 14784660,
"download_count": 628,
"created_at": "2020-01-05T18:58:47Z",
"updated_at": "2020-01-05T18:58:48Z",
"browser_download_url": "https://github.com/gohugoio/hugo/releases/download/v0.62.2/hugo_extended_0.62.2_macOS-64bit.tar.gz"
},
{
"url": "https://api.github.com/repos/gohugoio/hugo/releases/assets/17152853",
"id": 17152853,
"node_id": "MDEyOlJlbGVhc2VBc3NldDE3MTUyODUz",
"name": "hugo_extended_0.62.2_Windows-64bit.zip",
"label": "",
"uploader": {
"login": "bep",
"id": 394382,
"node_id": "MDQ6VXNlcjM5NDM4Mg==",
"avatar_url": "https://avatars1.githubusercontent.com/u/394382?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/bep",
"html_url": "https://github.com/bep",
"followers_url": "https://api.github.com/users/bep/followers",
"following_url": "https://api.github.com/users/bep/following{/other_user}",
"gists_url": "https://api.github.com/users/bep/gists{/gist_id}",
"starred_url": "https://api.github.com/users/bep/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/bep/subscriptions",
"organizations_url": "https://api.github.com/users/bep/orgs",
"repos_url": "https://api.github.com/users/bep/repos",
"events_url": "https://api.github.com/users/bep/events{/privacy}",
"received_events_url": "https://api.github.com/users/bep/received_events",
"type": "User",
"site_admin": false
},
"content_type": "application/zip",
"state": "uploaded",
"size": 30553922,
"download_count": 3681,
"created_at": "2020-01-05T18:58:48Z",
"updated_at": "2020-01-05T18:58:49Z",
"browser_download_url": "https://github.com/gohugoio/hugo/releases/download/v0.62.2/hugo_extended_0.62.2_Windows-64bit.zip"
}
],
"tarball_url": "https://api.github.com/repos/gohugoio/hugo/tarball/v0.62.2",
"zipball_url": "https://api.github.com/repos/gohugoio/hugo/zipball/v0.62.2",
"body": "The main driving force behind these patch releases in the new year has been getting a good story with [portable links](https://github.com/bep/portable-hugo-links/) between GitHub and Hugo, using the new render hooks introduced in [Hugo 0.62.0](https://gohugo.io/news/0.62.0-relnotes/). And all was mostly well until a Hugo user asked about anchor links. Which is, when you look into it, a slightly sad Markdown story. They have been [talking about anchors in Markdown](https://talk.commonmark.org/t/anchors-in-markdown/247) over at the CommonMark forum for the last six years, but it has come to nothing. The current situation is that some Markdown engines support the `{#anchorName}` attribute syntax (Hugo's Goldmark does, GitHub does not) and for those that support auto-generation of IDs, the implementation often varies. And this makes for poor portability.\r\n\r\nTo improve this, Hugo has now reverse-engineered GitHub's implementation and made that the default strategy for generation or header IDs. We understand that this isn't everyone's cup of tea, so you can [configure the behaviour](https://gohugo.io/getting-started/configuration-markup#goldmark) to be one of `github`, `github-ascii` (some client-libraries have Unicode issues) or `blackfriday` (which will match how it behaved before Hugo 0.60).\r\n\r\n* hugolib: Fix relative .Page.GetPage from bundle [196a9df5](https://github.com/gohugoio/hugo/commit/196a9df585c4744e3280f37c1c24e469fce14b8c) [@bep](https://github.com/bep) [#6705](https://github.com/gohugoio/hugo/issues/6705)\r\n* markup/goldmark: Adjust auto ID space handling [9b6e6146](https://github.com/gohugoio/hugo/commit/9b6e61464b09ffe3423fb8d7c72bddb7a9ed5b98) [@bep](https://github.com/bep) [#6710](https://github.com/gohugoio/hugo/issues/6710)\r\n* docs: Document the new autoHeadingIDType setting [d62ede8e](https://github.com/gohugoio/hugo/commit/d62ede8e9e5883e7ebb023e49b82f07b45edc1c7) [@bep](https://github.com/bep) [#6707](https://github.com/gohugoio/hugo/issues/6707)[#6616](https://github.com/gohugoio/hugo/issues/6616)\r\n* docs: Regenerate docshelper [81b7e48a](https://github.com/gohugoio/hugo/commit/81b7e48a55092203aeee8785799e6fed3928760e) [@bep](https://github.com/bep) [#6707](https://github.com/gohugoio/hugo/issues/6707)[#6616](https://github.com/gohugoio/hugo/issues/6616)\r\n* markup/goldmark: Add an optional Blackfriday auto ID strategy [16e7c112](https://github.com/gohugoio/hugo/commit/16e7c1120346bd853cf6510ffac8e94824bf2c7f) [@bep](https://github.com/bep) [#6707](https://github.com/gohugoio/hugo/issues/6707)\r\n* markup/goldmark: Make the autoID type config a string [8f071fc1](https://github.com/gohugoio/hugo/commit/8f071fc159ce9a0fc0ea14a73bde8f299bedd109) [@bep](https://github.com/bep) [#6707](https://github.com/gohugoio/hugo/issues/6707)\r\n* markup/goldmark: Simplify code [5ee1f087](https://github.com/gohugoio/hugo/commit/5ee1f0876f3ec8b79d6305298185dc821ead2d28) [@bep](https://github.com/bep) \r\n* markup/goldmark: Make auto IDs GitHub compatible [a82d2700](https://github.com/gohugoio/hugo/commit/a82d2700fcc772aada15d65b8f76913ca23f7404) [@bep](https://github.com/bep) [#6616](https://github.com/gohugoio/hugo/issues/6616)\r\n\r\n\r\n\r\n\r\n"
}

62
__tests__/main.test.ts Normal file
View File

@@ -0,0 +1,62 @@
import * as main from '../src/main';
import * as io from '@actions/io';
import path from 'path';
import nock from 'nock';
// import {FetchError} from 'node-fetch';
import jsonTestBrew from './data/brew.json';
// import jsonTestGithub from './data/github.json';
jest.setTimeout(30000);
const repo = 'hugo';
beforeEach(() => {
jest.resetModules();
});
afterEach(() => {
delete process.env['INPUT_HUGO-VERSION'];
nock.cleanAll();
});
describe('Integration testing run()', () => {
afterEach(async () => {
await io.rmRF(path.join(`${process.env.HOME}`, 'tmp'));
});
test('succeed in installing a custom version', async () => {
const testVersion = '0.61.0';
process.env['INPUT_HUGO-VERSION'] = testVersion;
const result: main.ActionResult = await main.run();
expect(result.exitcode).toBe(0);
expect(result.output).toMatch(`Hugo Static Site Generator v${testVersion}`);
});
test('succeed in installing the latest version', async () => {
const testVersion = 'latest';
process.env['INPUT_HUGO-VERSION'] = testVersion;
nock('https://formulae.brew.sh')
.get(`/api/formula/${repo}.json`)
.reply(200, jsonTestBrew);
const result: main.ActionResult = await main.run();
expect(result.exitcode).toBe(0);
expect(result.output).toMatch('Hugo Static Site Generator v0.62.2');
});
});
describe('showVersion()', () => {
let result: main.ActionResult = {
exitcode: 0,
output: ''
};
test('return version', async () => {
result = await main.showVersion('git', ['--version']);
expect(result.exitcode).toBe(0);
expect(result.output).toMatch(/git version/);
});
test('return not found', async () => {
result = await main.showVersion('gitgit', ['--version']);
expect(result.exitcode).not.toBe(0);
});
});