diff --git a/.github/workflows/_update-docs.yml b/.github/workflows/_update-docs.yml new file mode 100644 index 0000000..863f92d --- /dev/null +++ b/.github/workflows/_update-docs.yml @@ -0,0 +1,35 @@ +--- +# This workflow is centrally managed in https://github.com/LizardByte/.github/ +# Don't make changes to this file in this repo as they will be overwritten with changes made to the same file in +# the above-mentioned repo. + +# To use, add the `rtd` repository label to identify repositories that should trigger this workflow. +# If the project slug is not the repository name, add a repository variable named `READTHEDOCS_SLUG` with the value of +# the ReadTheDocs project slug. + +# Update readthedocs on release events. + +name: Update docs +permissions: {} + +on: + release: + types: + - created + - edited + - deleted + +concurrency: + group: "${{ github.workflow }}-${{ github.event.release.tag_name }}" + cancel-in-progress: true + +jobs: + update-docs: + name: Update docs + uses: LizardByte/.github/.github/workflows/__call-update-docs.yml@master + if: github.repository_owner == 'LizardByte' + permissions: {} + with: + readthedocs_slug: ${{ vars.READTHEDOCS_SLUG }} + secrets: + READTHEDOCS_TOKEN: ${{ secrets.READTHEDOCS_TOKEN }} diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 955b541..d13b50f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -226,64 +226,13 @@ jobs: node-package: name: Node package - needs: - - release-setup permissions: - contents: read - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - - - name: Set up Node.js - uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 - with: - node-version: ${{ env.NODE_VERSION }} - - - name: Set package version - env: - RELEASE_VERSION: ${{ needs.release-setup.outputs.release_version }} - run: npm version "${RELEASE_VERSION}" --no-git-tag-version - - - name: Install Node.js dependencies - run: npm ci --ignore-scripts - - - name: Test Node.js package - id: node-test - run: npm test - - - name: Check Node.js package contents - run: npm publish --dry-run - - - name: Upload Node.js test coverage - if: >- - always() && - (steps.node-test.outcome == 'success' || steps.node-test.outcome == 'failure') && - startsWith(github.repository, 'LizardByte/') - uses: codecov/codecov-action@303a32d7a59b442fa8d48b6a1cc6825c09c847a5 # v7.1.1 - with: - disable_search: true - fail_ci_if_error: true - files: ./coverage/lcov.info - flags: node-${{ env.NODE_VERSION }} - report_type: coverage - token: ${{ secrets.CODECOV_TOKEN }} - verbose: true - - - name: Upload Node.js test results - if: >- - always() && - (steps.node-test.outcome == 'success' || steps.node-test.outcome == 'failure') && - startsWith(github.repository, 'LizardByte/') - uses: codecov/codecov-action@303a32d7a59b442fa8d48b6a1cc6825c09c847a5 # v7.1.1 - with: - disable_search: true - fail_ci_if_error: true - files: ./junit-node.xml - flags: node-${{ env.NODE_VERSION }} - report_type: test_results - token: ${{ secrets.CODECOV_TOKEN }} - verbose: true + contents: write # required for release_setup action + uses: LizardByte/.github/.github/workflows/__call-ci-node.yml@master + with: + create_release: false + secrets: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} standalone: name: Standalone (${{ matrix.artifact }}) diff --git a/.gitignore b/.gitignore index e57da0b..c26870a 100644 --- a/.gitignore +++ b/.gitignore @@ -28,6 +28,6 @@ dist/ .coverage coverage/ junit-python.xml -junit-node.xml +junit.xml .pytest_cache/ .ruff_cache/ diff --git a/package-lock.json b/package-lock.json index 43840cc..f48ece8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -20,7 +20,7 @@ "c8": "10.1.3", "eslint": "10.11.0", "globals": "17.12.0", - "highlightjs-fixtures": "https://github.com/highlightjs/highlight.js/archive/refs/tags/11.12.0.tar.gz", + "highlightjs-fixtures": "github:highlightjs/highlight.js#11.12.0", "lucide": "1.47.0" }, "engines": { @@ -1209,8 +1209,7 @@ "node_modules/highlightjs-fixtures": { "name": "highlight.js", "version": "11.12.0", - "resolved": "https://github.com/highlightjs/highlight.js/archive/refs/tags/11.12.0.tar.gz", - "integrity": "sha512-7lBYD3ue/3INmo43yAFnYY58Gf+nsphBHzpJg29t+6kvv5sy3c+QiHOhRHEq9n16V64cIFnKjKcYm4QvJFLEfw==", + "resolved": "git+ssh://git@github.com/highlightjs/highlight.js.git#f7f7d3803bd898e37c017ffb881317f0cde04a70", "dev": true, "license": "BSD-3-Clause", "engines": { diff --git a/package.json b/package.json index 91e7095..e5fec73 100644 --- a/package.json +++ b/package.json @@ -55,7 +55,7 @@ "sync:lucide": "node scripts/sync-lucide.mjs", "test": "npm run test:unit && npm run test:lint", "test:lint": "eslint publish.js eslint.config.mjs bin scripts src/dockle/jsdoc_template src/dockle/sphinx/themes/dockle/static/dockle.js tests-js", - "test:unit": "c8 --all --include=publish.js --include=bin/*.cjs --include=src/dockle/jsdoc_template/*.js --reporter=lcov --reporter=text node --test --test-reporter=spec --test-reporter-destination=stdout --test-reporter=junit --test-reporter-destination=junit-node.xml tests-js/jsdoc-template.test.mjs", + "test:unit": "c8 --all --include=publish.js --include=bin/*.cjs --include=src/dockle/jsdoc_template/*.js --reporter=json --reporter=text node --test --test-reporter=spec --test-reporter-destination=stdout --test-reporter=junit --test-reporter-destination=junit.xml tests-js/jsdoc-template.test.mjs", "test:package": "npm pack --dry-run" }, "dependencies": { @@ -67,7 +67,7 @@ "c8": "10.1.3", "eslint": "10.11.0", "globals": "17.12.0", - "highlightjs-fixtures": "https://github.com/highlightjs/highlight.js/archive/refs/tags/11.12.0.tar.gz", + "highlightjs-fixtures": "github:highlightjs/highlight.js#11.12.0", "lucide": "1.47.0" } } diff --git a/renovate.json b/renovate.json index c92ee5f..11ebb7e 100644 --- a/renovate.json +++ b/renovate.json @@ -3,28 +3,5 @@ "extends": [ "local>LizardByte/.github:renovate-config" ], - "customManagers": [ - { - "customType": "regex", - "managerFilePatterns": [ - "/^package\\.json$/" - ], - "matchStrings": [ - "\\\"highlightjs-fixtures\\\":\\s*\\\"https://github\\.com/highlightjs/highlight\\.js/archive/refs/tags/(?[^/]+)\\.tar\\.gz\\\"" - ], - "depNameTemplate": "highlightjs/highlight.js", - "datasourceTemplate": "github-tags", - "versioningTemplate": "semver" - } - ], - "packageRules": [ - { - "matchPackageNames": [ - "@highlightjs/cdn-assets", - "highlightjs/highlight.js" - ], - "groupName": "highlight.js" - } - ], "forkProcessing": "enabled" } diff --git a/tests/test_project.py b/tests/test_project.py index 2643bae..9858008 100644 --- a/tests/test_project.py +++ b/tests/test_project.py @@ -109,8 +109,7 @@ def test_highlighter_runtime_is_managed_by_npm(self) -> None: self.assertRegex(version, r"^\d+\.\d+\.\d+$") self.assertEqual( fixtures, - "https://github.com/highlightjs/highlight.js/" - f"archive/refs/tags/{version}.tar.gz", + f"github:highlightjs/highlight.js#{version}", ) self.assertTrue( runtime.startswith(