Skip to content
This repository has been archived by the owner on Dec 1, 2020. It is now read-only.

WIP: Feature/GitHub actions ci #50

Closed
wants to merge 13 commits into from
108 changes: 108 additions & 0 deletions .ci/azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
name: $(Date:yyyyMMdd)$(Rev:.r)

trigger:
batch: true
branches:
include:
- master
- release-*
tags:
include:
- '*'

strategy:
matrix:
android:
systemName: "android"
electron:
systemName: "electron"
ios:
systemName: "ios"
web:
systemName: "web"
windows:
systemName: "windows"

jobs:
- job: build_$(systemName)
displayName: 'Build $(systemName)'

dependsOn: test
condition: succeeded()

pool:
vmImage: 'ubuntu-latest'

steps:
- task: NodeTool@0
displayName: 'Install Node.js'
inputs:
versionSpec: '10.x'

- script: |
yarn install
displayName: 'Install dependencies'
- script: |
yarn run $(systemName):release
displayName: 'Check dist directory'
- script: |
yarn pack --filename jellyfin-react-$(systemName).tgz
displayName: 'Build package'
- task: PublishPipelineArtifact@1
displayName: 'Publish package'
condition: succeeded()
inputs:
targetPath: '$(Build.SourcesDirectory)/jellyfin-react-$(systemName).tgz'
artifactName: 'jellyfin-web-$(systemName)'

- job: lint
displayName: 'Lint'

pool:
vmImage: 'ubuntu-latest'

steps:
- task: NodeTool@0
displayName: 'Install Node.js'
inputs:
versionSpec: '10.x'

- script: |
yarn install
displayName: 'Install dependencies'
- script: |
yarn run lint
displayName: 'Run ESLint'

- job: test
displayName: 'Test'

dependsOn: lint

pool:
vmImage: 'ubuntu-latest'

steps:
- task: NodeTool@0
displayName: 'Install Node.js'
inputs:
versionSpec: '10.x'

- script: |
yarn install
displayName: 'Install dependencies'
- script: |
yarn run test
displayName: 'Run Test'

# TODO
# task: PublishTestResults@2
# inputs:
# testResultsFiles: '**/TEST-RESULTS.xml'
# testRunTitle: 'Test results for JavaScript'

# - task: PublishCodeCoverageResults@1
# inputs:
# codeCoverageTool: Cobertura
# summaryFileLocation: '$(System.DefaultWorkingDirectory)/**/*coverage.xml'
# reportDirectory: '$(System.DefaultWorkingDirectory)/**/coverage'
5 changes: 4 additions & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,7 @@ indent_size = 4
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
end_of_line = lf
end_of_line = lf

[*.y{a,}ml]
indent_size = 2