-
-
Notifications
You must be signed in to change notification settings - Fork 114
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #21 from iamvishnusankar/development
Additional configuration options
- Loading branch information
Showing
34 changed files
with
439 additions
and
308 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,112 @@ | ||
name: 1.1$(rev:.r) | ||
trigger: | ||
branches: | ||
include: | ||
- master | ||
pr: | ||
branches: | ||
include: | ||
- master | ||
|
||
pool: | ||
vmImage: 'ubuntu-latest' | ||
demands: npm | ||
|
||
steps: | ||
# Setup Node | ||
- task: UseNode@1 | ||
displayName: Setup Node | ||
inputs: | ||
version: '14.x' | ||
|
||
# Authenticate | ||
- task: npmAuthenticate@0 | ||
displayName: NPM Auth | ||
inputs: | ||
workingFile: .npmrc | ||
customEndpoint: 'NPM(Vishnu Sankar)' | ||
|
||
# Install | ||
- task: Bash@3 | ||
displayName: 'Install' | ||
inputs: | ||
targetType: 'inline' | ||
script: 'yarn install' | ||
|
||
# Build | ||
- task: Bash@3 | ||
displayName: 'Build' | ||
inputs: | ||
targetType: 'inline' | ||
script: 'yarn build' | ||
failOnStderr: true | ||
|
||
# Lint | ||
- task: Bash@3 | ||
displayName: 'Lint' | ||
inputs: | ||
targetType: 'inline' | ||
script: 'yarn lint' | ||
failOnStderr: true | ||
|
||
# Test | ||
- task: Bash@3 | ||
displayName: 'Test' | ||
inputs: | ||
targetType: 'inline' | ||
script: 'yarn test --ci' | ||
|
||
# Set Version | ||
- task: Bash@3 | ||
displayName: 'Set Version' | ||
inputs: | ||
targetType: 'inline' | ||
script: 'yarn set-version' | ||
failOnStderr: true | ||
|
||
# Copy README | ||
- task: Bash@3 | ||
displayName: 'Copy README' | ||
inputs: | ||
targetType: 'inline' | ||
script: 'cp README.md packages/next-sitemap/README.md' | ||
failOnStderr: true | ||
|
||
# Test Result | ||
- task: PublishTestResults@2 | ||
displayName: Publish Test Result | ||
inputs: | ||
testResultsFormat: 'JUnit' | ||
testResultsFiles: 'junit.xml' | ||
failTaskOnFailedTests: true | ||
|
||
# Coverage Result | ||
- task: PublishCodeCoverageResults@1 | ||
displayName: Publish Coverage Result | ||
inputs: | ||
codeCoverageTool: 'Cobertura' | ||
summaryFileLocation: 'coverage/cobertura-coverage.xml' | ||
failIfCoverageEmpty: true | ||
|
||
# Publish Packages | ||
- task: Bash@3 | ||
displayName: 'Publish Packages' | ||
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/master')) | ||
inputs: | ||
targetType: 'inline' | ||
script: 'yarn ywc publish' | ||
failOnStderr: true | ||
|
||
# Github Release | ||
- task: GitHubRelease@1 | ||
displayName: Github Release | ||
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/master')) | ||
inputs: | ||
gitHubConnection: 'iamvishnusankar' | ||
repositoryName: '$(Build.Repository.Name)' | ||
action: 'create' | ||
target: '$(Build.SourceVersion)' | ||
tagSource: 'userSpecifiedTag' | ||
tag: 'v$(Build.BuildNumber)' | ||
changeLogCompareToRelease: 'lastFullRelease' | ||
changeLogType: 'commitBased' |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 0 additions & 25 deletions
25
packages/next-sitemap/src/array/__snapshots__/index.test.ts.snap
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,26 @@ | ||
import { toChunks, toArray } from './index' | ||
import { toChunks, toArray, removeFromArray } from './index' | ||
|
||
describe('next-sitemap/array', () => { | ||
test('toChunks', () => { | ||
const inputArray = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10] | ||
const chunkSize = 3 | ||
|
||
const chunks = toChunks(inputArray, chunkSize) | ||
|
||
expect(chunks).toMatchSnapshot() | ||
expect(chunks.length).toBe(Math.ceil(inputArray.length / chunkSize)) | ||
expect(chunks).toStrictEqual([ | ||
[0, 1, 2], | ||
[3, 4, 5], | ||
[6, 7, 8], | ||
[9, 10], | ||
]) | ||
}) | ||
|
||
test('toArray', () => { | ||
expect(toArray('hello')).toStrictEqual(['hello']) | ||
expect(toArray(['hello', 'world'])).toStrictEqual(['hello', 'world']) | ||
}) | ||
|
||
test('removeFromArray', () => { | ||
expect(removeFromArray([1, 2, 3], [2])).toStrictEqual([1, 3]) | ||
expect(removeFromArray([1, 2, 3], [2, 3, 4])).toStrictEqual([1]) | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.