mirror of
https://github.com/JamesIves/github-pages-deploy-action.git
synced 2023-12-15 20:03:39 +08:00
Fixes tests etc
This commit is contained in:
parent
ab9d9526bc
commit
30a915e43b
@ -32,7 +32,8 @@ describe('util', () => {
|
|||||||
folder: 'build',
|
folder: 'build',
|
||||||
gitHubToken: null,
|
gitHubToken: null,
|
||||||
accessToken: null,
|
accessToken: null,
|
||||||
ssh: true
|
ssh: true,
|
||||||
|
silent: false
|
||||||
}
|
}
|
||||||
expect(generateTokenType(action)).toEqual('SSH Deploy Key')
|
expect(generateTokenType(action)).toEqual('SSH Deploy Key')
|
||||||
})
|
})
|
||||||
@ -45,7 +46,8 @@ describe('util', () => {
|
|||||||
folder: 'build',
|
folder: 'build',
|
||||||
gitHubToken: null,
|
gitHubToken: null,
|
||||||
accessToken: '123',
|
accessToken: '123',
|
||||||
ssh: null
|
ssh: null,
|
||||||
|
silent: false
|
||||||
}
|
}
|
||||||
expect(generateTokenType(action)).toEqual('Access Token')
|
expect(generateTokenType(action)).toEqual('Access Token')
|
||||||
})
|
})
|
||||||
@ -58,7 +60,8 @@ describe('util', () => {
|
|||||||
folder: 'build',
|
folder: 'build',
|
||||||
gitHubToken: '123',
|
gitHubToken: '123',
|
||||||
accessToken: null,
|
accessToken: null,
|
||||||
ssh: null
|
ssh: null,
|
||||||
|
silent: false
|
||||||
}
|
}
|
||||||
expect(generateTokenType(action)).toEqual('GitHub Token')
|
expect(generateTokenType(action)).toEqual('GitHub Token')
|
||||||
})
|
})
|
||||||
@ -71,7 +74,8 @@ describe('util', () => {
|
|||||||
folder: 'build',
|
folder: 'build',
|
||||||
gitHubToken: null,
|
gitHubToken: null,
|
||||||
accessToken: null,
|
accessToken: null,
|
||||||
ssh: null
|
ssh: null,
|
||||||
|
silent: false
|
||||||
}
|
}
|
||||||
expect(generateTokenType(action)).toEqual('…')
|
expect(generateTokenType(action)).toEqual('…')
|
||||||
})
|
})
|
||||||
@ -87,7 +91,8 @@ describe('util', () => {
|
|||||||
folder: 'build',
|
folder: 'build',
|
||||||
gitHubToken: null,
|
gitHubToken: null,
|
||||||
accessToken: null,
|
accessToken: null,
|
||||||
ssh: true
|
ssh: true,
|
||||||
|
silent: false
|
||||||
}
|
}
|
||||||
expect(generateRepositoryPath(action)).toEqual(
|
expect(generateRepositoryPath(action)).toEqual(
|
||||||
'git@github.com:JamesIves/github-pages-deploy-action'
|
'git@github.com:JamesIves/github-pages-deploy-action'
|
||||||
@ -103,7 +108,8 @@ describe('util', () => {
|
|||||||
folder: 'build',
|
folder: 'build',
|
||||||
gitHubToken: null,
|
gitHubToken: null,
|
||||||
accessToken: '123',
|
accessToken: '123',
|
||||||
ssh: null
|
ssh: null,
|
||||||
|
silent: false
|
||||||
}
|
}
|
||||||
expect(generateRepositoryPath(action)).toEqual(
|
expect(generateRepositoryPath(action)).toEqual(
|
||||||
'https://123@github.com/JamesIves/github-pages-deploy-action.git'
|
'https://123@github.com/JamesIves/github-pages-deploy-action.git'
|
||||||
@ -119,7 +125,8 @@ describe('util', () => {
|
|||||||
folder: 'build',
|
folder: 'build',
|
||||||
gitHubToken: '123',
|
gitHubToken: '123',
|
||||||
accessToken: null,
|
accessToken: null,
|
||||||
ssh: null
|
ssh: null,
|
||||||
|
silent: false
|
||||||
}
|
}
|
||||||
expect(generateRepositoryPath(action)).toEqual(
|
expect(generateRepositoryPath(action)).toEqual(
|
||||||
'https://x-access-token:123@github.com/JamesIves/github-pages-deploy-action.git'
|
'https://x-access-token:123@github.com/JamesIves/github-pages-deploy-action.git'
|
||||||
@ -137,7 +144,8 @@ describe('util', () => {
|
|||||||
workspace: 'src/',
|
workspace: 'src/',
|
||||||
folder: 'build',
|
folder: 'build',
|
||||||
accessToken: 'supersecret999%%%',
|
accessToken: 'supersecret999%%%',
|
||||||
gitHubToken: 'anothersecret123333'
|
gitHubToken: 'anothersecret123333',
|
||||||
|
silent: false
|
||||||
}
|
}
|
||||||
|
|
||||||
const string = `This is an error message! It contains ${action.accessToken} and ${action.gitHubToken} and ${action.repositoryPath}`
|
const string = `This is an error message! It contains ${action.accessToken} and ${action.gitHubToken} and ${action.repositoryPath}`
|
||||||
@ -156,7 +164,8 @@ describe('util', () => {
|
|||||||
workspace: 'src/',
|
workspace: 'src/',
|
||||||
folder: 'build',
|
folder: 'build',
|
||||||
accessToken: 'supersecret999%%%',
|
accessToken: 'supersecret999%%%',
|
||||||
gitHubToken: 'anothersecret123333'
|
gitHubToken: 'anothersecret123333',
|
||||||
|
silent: false
|
||||||
}
|
}
|
||||||
|
|
||||||
process.env['RUNNER_DEBUG'] = '1'
|
process.env['RUNNER_DEBUG'] = '1'
|
||||||
|
@ -30,7 +30,8 @@ export async function init(action: ActionInterface): Promise<void | Error> {
|
|||||||
await execute(`git remote rm origin`, action.workspace, action.silent)
|
await execute(`git remote rm origin`, action.workspace, action.silent)
|
||||||
await execute(
|
await execute(
|
||||||
`git remote add origin ${action.repositoryPath}`,
|
`git remote add origin ${action.repositoryPath}`,
|
||||||
action.workspace
|
action.workspace,
|
||||||
|
action.silent
|
||||||
)
|
)
|
||||||
await execute(
|
await execute(
|
||||||
`git fetch --no-recurse-submodules`,
|
`git fetch --no-recurse-submodules`,
|
||||||
|
Loading…
Reference in New Issue
Block a user