From 3684cf3ca9ce8da7838c96c1220a694467965ba8 Mon Sep 17 00:00:00 2001 From: Edmund Miller Date: Sat, 11 Jan 2020 18:08:42 -0600 Subject: [PATCH 01/13] feat: add GitHub actions for test and release https://github.com/jellyfin/jellyfin-react-client/issues/19 --- .github/workflows/release.yml | 34 ++++++++++++++++++++++++++++++++++ .github/workflows/test.yml | 27 +++++++++++++++++++++++++++ 2 files changed, 61 insertions(+) create mode 100644 .github/workflows/release.yml create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..dcd3e9d --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,34 @@ +name: Jellyfin React Client Release + +on: + push: + branches: + - master + +jobs: + release: + + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [8.x, 10.x, 12.x] + platform: [android, electron, ios, web] + + steps: + - uses: actions/checkout@v1 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node-version }} + - name: test install, build, and test + run: | + yarn install + yarn update + yarn test + env: + CI: true + - name: Release ${{ matrix.platform }} + run: yarn run ${{ matrix.platform }}:release + env: + CI: true diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..6a8152c --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,27 @@ +name: Jellyfin React Client Testing + +on: [push] + +jobs: + build: + + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [8.x, 10.x, 12.x] + + steps: + - uses: actions/checkout@v1 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node-version }} + - name: yarn install + run: yarn install + - name: yarn update + run: yarn update + - name: yarn test + run: yarn test + env: + CI: true From dce4418c623d52611c9e17bed5201b159162c59b Mon Sep 17 00:00:00 2001 From: Edmund Miller Date: Sat, 11 Jan 2020 18:40:43 -0600 Subject: [PATCH 02/13] fix(actions): remove yarn update https://github.com/jellyfin/jellyfin-react-client/issues/19 --- .github/workflows/release.yml | 1 - .github/workflows/test.yml | 2 -- 2 files changed, 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index dcd3e9d..f2056e6 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -24,7 +24,6 @@ jobs: - name: test install, build, and test run: | yarn install - yarn update yarn test env: CI: true diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 6a8152c..46ee93c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -19,8 +19,6 @@ jobs: node-version: ${{ matrix.node-version }} - name: yarn install run: yarn install - - name: yarn update - run: yarn update - name: yarn test run: yarn test env: From 0b0e77af418ce243682ab64daee5c761a14de066 Mon Sep 17 00:00:00 2001 From: Edmund Miller Date: Sat, 11 Jan 2020 18:47:52 -0600 Subject: [PATCH 03/13] ci: test on PRs https://github.com/jellyfin/jellyfin-react-client/issues/19 --- .github/workflows/test.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 46ee93c..49c5124 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,6 +1,12 @@ name: Jellyfin React Client Testing -on: [push] +on: + push: + branches: + - master + pull_request: + branches: + - master jobs: build: From dca87f3ab729d3b9587e6caf9a4f69628171267b Mon Sep 17 00:00:00 2001 From: Edmund Miller Date: Sat, 11 Jan 2020 18:54:55 -0600 Subject: [PATCH 04/13] ci: remove testing for now Waiting on #33 to get merged https://github.com/jellyfin/jellyfin-react-client/pull/33 For https://github.com/jellyfin/jellyfin-react-client/issues/19 --- .github/workflows/release.yml | 5 +++-- .github/workflows/test.yml | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f2056e6..c2ab2e6 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -21,10 +21,11 @@ jobs: uses: actions/setup-node@v1 with: node-version: ${{ matrix.node-version }} - - name: test install, build, and test + - name: test install, and test run: | yarn install - yarn test + # FIXME: https://github.com/jellyfin/jellyfin-react-client/pull/33 + # yarn test env: CI: true - name: Release ${{ matrix.platform }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 49c5124..40bef9f 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -25,7 +25,8 @@ jobs: node-version: ${{ matrix.node-version }} - name: yarn install run: yarn install - - name: yarn test - run: yarn test env: CI: true + # FIXME: https://github.com/jellyfin/jellyfin-react-client/pull/33 + # name: yarn test + # run: yarn test From 709c7b9ac0834b9b4db045a6a6f29b4a19657afd Mon Sep 17 00:00:00 2001 From: Edmund Miller Date: Sat, 11 Jan 2020 19:22:17 -0600 Subject: [PATCH 05/13] ci: add lint job --- .github/workflows/test.yml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 40bef9f..9bbb5c7 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -9,8 +9,31 @@ on: - master jobs: + lint: + + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [8.x, 10.x, 12.x] + + steps: + - uses: actions/checkout@v1 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node-version }} + - name: yarn install + run: yarn install + env: + CI: true + - name: eslint + run: yarn lint + build: + needs: lint + runs-on: ubuntu-latest strategy: From 0c6d0358c7c102d1e867891eb5feb4469ad93eb3 Mon Sep 17 00:00:00 2001 From: Edmund Miller Date: Sat, 11 Jan 2020 19:24:15 -0600 Subject: [PATCH 06/13] ci: unify workflows for CI Seperate files will be better for repo management, etc. --- .github/workflows/{test.yml => CI.yml} | 31 ++++++++++++++++++++++- .github/workflows/release.yml | 34 -------------------------- 2 files changed, 30 insertions(+), 35 deletions(-) rename .github/workflows/{test.yml => CI.yml} (59%) delete mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/test.yml b/.github/workflows/CI.yml similarity index 59% rename from .github/workflows/test.yml rename to .github/workflows/CI.yml index 9bbb5c7..22a6c6e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/CI.yml @@ -30,7 +30,7 @@ jobs: - name: eslint run: yarn lint - build: + test: needs: lint @@ -53,3 +53,32 @@ jobs: # FIXME: https://github.com/jellyfin/jellyfin-react-client/pull/33 # name: yarn test # run: yarn test + + release: + + needs: [lint, test] + + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [8.x, 10.x, 12.x] + platform: [android, electron, ios, web] + + steps: + - uses: actions/checkout@v1 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node-version }} + - name: test install, and test + run: | + yarn install + # FIXME: https://github.com/jellyfin/jellyfin-react-client/pull/33 + # yarn test + env: + CI: true + - name: Release ${{ matrix.platform }} + run: yarn run ${{ matrix.platform }}:release + env: + CI: true diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml deleted file mode 100644 index c2ab2e6..0000000 --- a/.github/workflows/release.yml +++ /dev/null @@ -1,34 +0,0 @@ -name: Jellyfin React Client Release - -on: - push: - branches: - - master - -jobs: - release: - - runs-on: ubuntu-latest - - strategy: - matrix: - node-version: [8.x, 10.x, 12.x] - platform: [android, electron, ios, web] - - steps: - - uses: actions/checkout@v1 - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v1 - with: - node-version: ${{ matrix.node-version }} - - name: test install, and test - run: | - yarn install - # FIXME: https://github.com/jellyfin/jellyfin-react-client/pull/33 - # yarn test - env: - CI: true - - name: Release ${{ matrix.platform }} - run: yarn run ${{ matrix.platform }}:release - env: - CI: true From c8e61f42513f725476bad4d6abd3a6d7d8ca8392 Mon Sep 17 00:00:00 2001 From: Edmund Miller Date: Sat, 11 Jan 2020 19:26:07 -0600 Subject: [PATCH 07/13] ci: add windows to matrix --- .github/workflows/CI.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 22a6c6e..cdadf29 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -63,7 +63,7 @@ jobs: strategy: matrix: node-version: [8.x, 10.x, 12.x] - platform: [android, electron, ios, web] + platform: [android, electron, ios, web, windows] steps: - uses: actions/checkout@v1 @@ -82,3 +82,4 @@ jobs: run: yarn run ${{ matrix.platform }}:release env: CI: true + # TODO: release-windows job From c37a1fde63f454c78ced7e7edadde32bf8d0e534 Mon Sep 17 00:00:00 2001 From: Edmund Miller Date: Sat, 11 Jan 2020 19:28:17 -0600 Subject: [PATCH 08/13] ci: fix name --- .github/workflows/CI.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index cdadf29..3860496 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -1,4 +1,4 @@ -name: Jellyfin React Client Testing +name: Jellyfin React Client on: push: From 22bfbfb87b706a9e678411591374d936281c6213 Mon Sep 17 00:00:00 2001 From: Edmund Miller Date: Sat, 11 Jan 2020 19:29:07 -0600 Subject: [PATCH 09/13] style: clean up whitespace --- .github/workflows/CI.yml | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 3860496..5b405b4 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -10,13 +10,10 @@ on: jobs: lint: - runs-on: ubuntu-latest - strategy: matrix: node-version: [8.x, 10.x, 12.x] - steps: - uses: actions/checkout@v1 - name: Use Node.js ${{ matrix.node-version }} @@ -31,15 +28,11 @@ jobs: run: yarn lint test: - needs: lint - runs-on: ubuntu-latest - strategy: matrix: node-version: [8.x, 10.x, 12.x] - steps: - uses: actions/checkout@v1 - name: Use Node.js ${{ matrix.node-version }} @@ -55,16 +48,12 @@ jobs: # run: yarn test release: - needs: [lint, test] - runs-on: ubuntu-latest - strategy: matrix: node-version: [8.x, 10.x, 12.x] platform: [android, electron, ios, web, windows] - steps: - uses: actions/checkout@v1 - name: Use Node.js ${{ matrix.node-version }} @@ -82,4 +71,5 @@ jobs: run: yarn run ${{ matrix.platform }}:release env: CI: true - # TODO: release-windows job + + # TODO: release-windows job From 78292d0aa30003a430bbde5fd2a48fb99e3dc66d Mon Sep 17 00:00:00 2001 From: Edmund Miller Date: Sat, 11 Jan 2020 19:33:25 -0600 Subject: [PATCH 10/13] ci: remove unnecessary test from release --- .github/workflows/CI.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 5b405b4..c9c1ab9 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -60,11 +60,6 @@ jobs: uses: actions/setup-node@v1 with: node-version: ${{ matrix.node-version }} - - name: test install, and test - run: | - yarn install - # FIXME: https://github.com/jellyfin/jellyfin-react-client/pull/33 - # yarn test env: CI: true - name: Release ${{ matrix.platform }} From 67ab13e168a367d886d8c556781daa378390ab2c Mon Sep 17 00:00:00 2001 From: Edmund Miller Date: Sun, 12 Jan 2020 17:49:21 -0600 Subject: [PATCH 11/13] fix: remove github-actions in favor of azure-pipelines https://github.com/jellyfin/jellyfin-react-client/pull/50#issuecomment-573405628 --- .github/workflows/CI.yml | 70 ---------------------------------------- 1 file changed, 70 deletions(-) delete mode 100644 .github/workflows/CI.yml diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml deleted file mode 100644 index c9c1ab9..0000000 --- a/.github/workflows/CI.yml +++ /dev/null @@ -1,70 +0,0 @@ -name: Jellyfin React Client - -on: - push: - branches: - - master - pull_request: - branches: - - master - -jobs: - lint: - runs-on: ubuntu-latest - strategy: - matrix: - node-version: [8.x, 10.x, 12.x] - steps: - - uses: actions/checkout@v1 - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v1 - with: - node-version: ${{ matrix.node-version }} - - name: yarn install - run: yarn install - env: - CI: true - - name: eslint - run: yarn lint - - test: - needs: lint - runs-on: ubuntu-latest - strategy: - matrix: - node-version: [8.x, 10.x, 12.x] - steps: - - uses: actions/checkout@v1 - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v1 - with: - node-version: ${{ matrix.node-version }} - - name: yarn install - run: yarn install - env: - CI: true - # FIXME: https://github.com/jellyfin/jellyfin-react-client/pull/33 - # name: yarn test - # run: yarn test - - release: - needs: [lint, test] - runs-on: ubuntu-latest - strategy: - matrix: - node-version: [8.x, 10.x, 12.x] - platform: [android, electron, ios, web, windows] - steps: - - uses: actions/checkout@v1 - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v1 - with: - node-version: ${{ matrix.node-version }} - env: - CI: true - - name: Release ${{ matrix.platform }} - run: yarn run ${{ matrix.platform }}:release - env: - CI: true - - # TODO: release-windows job From 7559e3972c059e0c568832f82b9e0d5f1dcbbda2 Mon Sep 17 00:00:00 2001 From: Edmund Miller Date: Sun, 12 Jan 2020 17:55:55 -0600 Subject: [PATCH 12/13] style: use 2 spaces for yaml --- .editorconfig | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.editorconfig b/.editorconfig index 60ae4c5..84b5deb 100644 --- a/.editorconfig +++ b/.editorconfig @@ -6,4 +6,7 @@ indent_size = 4 charset = utf-8 trim_trailing_whitespace = true insert_final_newline = true -end_of_line = lf \ No newline at end of file +end_of_line = lf + +[*.y{a,}ml] +indent_size = 2 From 2b980d28c2edb5355c43bf05b0d7327b4333bcd0 Mon Sep 17 00:00:00 2001 From: Edmund Miller Date: Sun, 12 Jan 2020 18:16:38 -0600 Subject: [PATCH 13/13] ci: initial azure pipeline configuration --- .ci/azure-pipelines.yml | 108 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 108 insertions(+) create mode 100644 .ci/azure-pipelines.yml diff --git a/.ci/azure-pipelines.yml b/.ci/azure-pipelines.yml new file mode 100644 index 0000000..7abb67f --- /dev/null +++ b/.ci/azure-pipelines.yml @@ -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'