mirror of
https://github.com/verdaccio/verdaccio.git
synced 2024-12-30 22:34:10 -05:00
chore: update ci scripts
This commit is contained in:
parent
01f9b3c3b4
commit
40e125fd2d
14 changed files with 15 additions and 327 deletions
|
@ -4,7 +4,7 @@
|
|||
"commit": false,
|
||||
"linked": [],
|
||||
"access": "public",
|
||||
"baseBranch": "6.x",
|
||||
"baseBranch": "master",
|
||||
"updateInternalDependencies": "patch",
|
||||
"ignore": []
|
||||
}
|
||||
|
|
4
.github/workflows/changesets.yml
vendored
4
.github/workflows/changesets.yml
vendored
|
@ -6,7 +6,7 @@ on:
|
|||
|
||||
push:
|
||||
branches:
|
||||
- 6.x
|
||||
- master
|
||||
|
||||
env:
|
||||
CI: true
|
||||
|
@ -17,7 +17,7 @@ jobs:
|
|||
version:
|
||||
timeout-minutes: 14
|
||||
runs-on: ubuntu-latest
|
||||
if: github.ref == 'refs/heads/6.x' && github.repository == 'verdaccio/verdaccio'
|
||||
if: github.ref == 'refs/heads/master' && github.repository == 'verdaccio/verdaccio'
|
||||
steps:
|
||||
- name: checkout code repository
|
||||
uses: actions/checkout@v2
|
||||
|
|
4
.github/workflows/ci-e2e-ui.yml
vendored
4
.github/workflows/ci-e2e-ui.yml
vendored
|
@ -3,8 +3,8 @@ name: E2E UI
|
|||
on:
|
||||
push:
|
||||
branches:
|
||||
- 6.x
|
||||
- 'changeset-release/6.x'
|
||||
- master
|
||||
- 'changeset-release/masters'
|
||||
pull_request:
|
||||
paths:
|
||||
- .github/workflows/ci.yml
|
||||
|
|
4
.github/workflows/ci-e2e.yml
vendored
4
.github/workflows/ci-e2e.yml
vendored
|
@ -3,8 +3,8 @@ name: E2E CLI
|
|||
on:
|
||||
push:
|
||||
branches:
|
||||
- 5.x
|
||||
- 'changeset-release/6.x'
|
||||
- master
|
||||
- 'changeset-release/master'
|
||||
pull_request:
|
||||
paths:
|
||||
- .github/workflows/ci.yml
|
||||
|
|
49
.github/workflows/ci-pnpm-dev.yml
vendored
49
.github/workflows/ci-pnpm-dev.yml
vendored
|
@ -1,49 +0,0 @@
|
|||
name: CI with pnpm 6
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- 5.x
|
||||
- 'changeset-release/6.x'
|
||||
pull_request:
|
||||
paths:
|
||||
- .changeset/**
|
||||
- .github/workflows/ci.yml
|
||||
- 'packages/**'
|
||||
- 'jest/**'
|
||||
- 'package.json'
|
||||
- 'pnpm-workspace.yaml'
|
||||
|
||||
jobs:
|
||||
ci:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [ubuntu-latest]
|
||||
node_version: [12, 15]
|
||||
|
||||
name: ${{ matrix.os }} / Node ${{ matrix.node_version }}
|
||||
runs-on: ${{ matrix.os }}
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2.3.1
|
||||
- name: Use Node ${{ matrix.node_version }}
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node_version: ${{ matrix.node_version }}
|
||||
- name: Install pnpm
|
||||
run: sudo npm i pnpm@dev -g
|
||||
- name: Install
|
||||
run: pnpm recursive install
|
||||
- name: Format
|
||||
run: pnpm format:check
|
||||
- name: Lint
|
||||
run: pnpm lint
|
||||
- name: Clean
|
||||
run: pnpm clean
|
||||
- name: Build
|
||||
run: pnpm build
|
||||
- name: Test
|
||||
run: pnpm test
|
||||
env:
|
||||
DEBUG: verdaccio:web:*
|
4
.github/workflows/ci.yml
vendored
4
.github/workflows/ci.yml
vendored
|
@ -3,8 +3,8 @@ name: CI
|
|||
on:
|
||||
push:
|
||||
branches:
|
||||
- 6.x
|
||||
- 'changeset-release/6.x'
|
||||
- master
|
||||
- 'changeset-release/master'
|
||||
pull_request:
|
||||
paths:
|
||||
- .changeset/**
|
||||
|
|
4
.github/workflows/codeql-analysis.yml
vendored
4
.github/workflows/codeql-analysis.yml
vendored
|
@ -3,8 +3,8 @@ name: 'Code scanning - action'
|
|||
on:
|
||||
push:
|
||||
branches-ignore:
|
||||
- 5.x
|
||||
- 'changeset-release/6.x'
|
||||
- master
|
||||
- 'changeset-release/master'
|
||||
- 'dev/**'
|
||||
pull_request:
|
||||
paths:
|
||||
|
|
6
.github/workflows/docker-publish.yml
vendored
6
.github/workflows/docker-publish.yml
vendored
|
@ -12,7 +12,7 @@ on:
|
|||
- 'Dockerfile'
|
||||
- '.dockerignore'
|
||||
branches:
|
||||
- '6.x'
|
||||
- 'master'
|
||||
tags:
|
||||
- 'v*'
|
||||
jobs:
|
||||
|
@ -34,8 +34,8 @@ jobs:
|
|||
uses: crazy-max/ghaction-docker-meta@v1
|
||||
with:
|
||||
images: ${{ github.repository }}
|
||||
tag-custom: 6.x-next
|
||||
tag-custom-only: ${{ github.ref == 'refs/heads/6.x' }}
|
||||
tag-custom: nightly-master
|
||||
tag-custom-only: ${{ github.ref == 'refs/heads/master' }}
|
||||
tag-semver: |
|
||||
{{version}}
|
||||
{{major}}
|
||||
|
|
|
@ -135,15 +135,11 @@ Below are the most commonly needed information,
|
|||
every aspect of Docker and verdaccio is [documented separately](https://www.verdaccio.org/docs/en/docker.html)
|
||||
|
||||
```
|
||||
docker pull verdaccio/verdaccio:6.x-next
|
||||
docker pull verdaccio/verdaccio:nightly-master
|
||||
```
|
||||
|
||||
Available as [tags](https://hub.docker.com/r/verdaccio/verdaccio/tags/).
|
||||
|
||||
```
|
||||
docker pull verdaccio/verdaccio:5.x-next
|
||||
```
|
||||
|
||||
### Running verdaccio using Docker
|
||||
|
||||
To run the docker container:
|
||||
|
|
|
@ -1,5 +0,0 @@
|
|||
{
|
||||
"rules": {
|
||||
"max-len": "off"
|
||||
}
|
||||
}
|
|
@ -1,5 +0,0 @@
|
|||
{
|
||||
"rules": {
|
||||
"max-len": "off"
|
||||
}
|
||||
}
|
|
@ -1,151 +0,0 @@
|
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`template custom body after 1`] = `
|
||||
"
|
||||
<!DOCTYPE html>
|
||||
<html lang=\\"en-us\\">
|
||||
<head>
|
||||
<meta charset=\\"utf-8\\">
|
||||
<base href=\\"http://domain.com\\">
|
||||
<title></title>
|
||||
<link rel=\\"icon\\" href=\\"http://domain.com-/static/favicon.ico\\"/>
|
||||
<meta name=\\"viewport\\" content=\\"width=device-width, initial-scale=1\\" />
|
||||
<script>
|
||||
window.__VERDACCIO_BASENAME_UI_OPTIONS={\\"base\\":\\"http://domain.com\\"}
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body class=\\"body\\">
|
||||
|
||||
<div id=\\"root\\"></div>
|
||||
<script defer=\\"defer\\" src=\\"http://domain.com-/static/runtime.9be80fd172e81558124c.js\\"></script><script defer=\\"defer\\" src=\\"http://domain.com-/static/main.9be80fd172e81558124c.js\\"></script>
|
||||
<script src=\\"foo\\"/>
|
||||
</body>
|
||||
</html>
|
||||
"
|
||||
`;
|
||||
|
||||
exports[`template custom body before 1`] = `
|
||||
"
|
||||
<!DOCTYPE html>
|
||||
<html lang=\\"en-us\\">
|
||||
<head>
|
||||
<meta charset=\\"utf-8\\">
|
||||
<base href=\\"http://domain.com\\">
|
||||
<title></title>
|
||||
<link rel=\\"icon\\" href=\\"http://domain.com-/static/favicon.ico\\"/>
|
||||
<meta name=\\"viewport\\" content=\\"width=device-width, initial-scale=1\\" />
|
||||
<script>
|
||||
window.__VERDACCIO_BASENAME_UI_OPTIONS={\\"base\\":\\"http://domain.com\\"}
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body class=\\"body\\">
|
||||
<script src=\\"fooBefore\\"/><script src=\\"barBefore\\"/>
|
||||
<div id=\\"root\\"></div>
|
||||
<script defer=\\"defer\\" src=\\"http://domain.com-/static/runtime.9be80fd172e81558124c.js\\"></script><script defer=\\"defer\\" src=\\"http://domain.com-/static/main.9be80fd172e81558124c.js\\"></script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
"
|
||||
`;
|
||||
|
||||
exports[`template custom render 1`] = `
|
||||
"
|
||||
<!DOCTYPE html>
|
||||
<html lang=\\"en-us\\">
|
||||
<head>
|
||||
<meta charset=\\"utf-8\\">
|
||||
<base href=\\"http://domain.com\\">
|
||||
<title></title>
|
||||
<link rel=\\"icon\\" href=\\"http://domain.com-/static/favicon.ico\\"/>
|
||||
<meta name=\\"viewport\\" content=\\"width=device-width, initial-scale=1\\" />
|
||||
<script>
|
||||
window.__VERDACCIO_BASENAME_UI_OPTIONS={\\"base\\":\\"http://domain.com\\"}
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body class=\\"body\\">
|
||||
|
||||
<div id=\\"root\\"></div>
|
||||
<script defer=\\"defer\\" src=\\"http://domain.com-/static/runtime.9be80fd172e81558124c.js\\"></script><script defer=\\"defer\\" src=\\"http://domain.com-/static/main.9be80fd172e81558124c.js\\"></script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
"
|
||||
`;
|
||||
|
||||
exports[`template custom title 1`] = `
|
||||
"
|
||||
<!DOCTYPE html>
|
||||
<html lang=\\"en-us\\">
|
||||
<head>
|
||||
<meta charset=\\"utf-8\\">
|
||||
<base href=\\"http://domain.com\\">
|
||||
<title>foo title</title>
|
||||
<link rel=\\"icon\\" href=\\"http://domain.com-/static/favicon.ico\\"/>
|
||||
<meta name=\\"viewport\\" content=\\"width=device-width, initial-scale=1\\" />
|
||||
<script>
|
||||
window.__VERDACCIO_BASENAME_UI_OPTIONS={\\"base\\":\\"http://domain.com\\",\\"title\\":\\"foo title\\"}
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body class=\\"body\\">
|
||||
|
||||
<div id=\\"root\\"></div>
|
||||
<script defer=\\"defer\\" src=\\"http://domain.com-/static/runtime.9be80fd172e81558124c.js\\"></script><script defer=\\"defer\\" src=\\"http://domain.com-/static/main.9be80fd172e81558124c.js\\"></script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
"
|
||||
`;
|
||||
|
||||
exports[`template custom title 2`] = `
|
||||
"
|
||||
<!DOCTYPE html>
|
||||
<html lang=\\"en-us\\">
|
||||
<head>
|
||||
<meta charset=\\"utf-8\\">
|
||||
<base href=\\"http://domain.com\\">
|
||||
<title>foo title</title>
|
||||
<link rel=\\"icon\\" href=\\"http://domain.com-/static/favicon.ico\\"/>
|
||||
<meta name=\\"viewport\\" content=\\"width=device-width, initial-scale=1\\" />
|
||||
<script>
|
||||
window.__VERDACCIO_BASENAME_UI_OPTIONS={\\"base\\":\\"http://domain.com\\",\\"title\\":\\"foo title\\"}
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body class=\\"body\\">
|
||||
|
||||
<div id=\\"root\\"></div>
|
||||
<script defer=\\"defer\\" src=\\"http://domain.com-/static/runtime.9be80fd172e81558124c.js\\"></script><script defer=\\"defer\\" src=\\"http://domain.com-/static/main.9be80fd172e81558124c.js\\"></script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
"
|
||||
`;
|
||||
|
||||
exports[`template meta scripts 1`] = `
|
||||
"
|
||||
<!DOCTYPE html>
|
||||
<html lang=\\"en-us\\">
|
||||
<head>
|
||||
<meta charset=\\"utf-8\\">
|
||||
<base href=\\"http://domain.com\\">
|
||||
<title></title>
|
||||
<link rel=\\"icon\\" href=\\"http://domain.com-/static/favicon.ico\\"/>
|
||||
<meta name=\\"viewport\\" content=\\"width=device-width, initial-scale=1\\" />
|
||||
<script>
|
||||
window.__VERDACCIO_BASENAME_UI_OPTIONS={\\"base\\":\\"http://domain.com\\"}
|
||||
</script>
|
||||
<style>.someclass{font-size:10px;}</style>
|
||||
</head>
|
||||
<body class=\\"body\\">
|
||||
|
||||
<div id=\\"root\\"></div>
|
||||
<script defer=\\"defer\\" src=\\"http://domain.com-/static/runtime.9be80fd172e81558124c.js\\"></script><script defer=\\"defer\\" src=\\"http://domain.com-/static/main.9be80fd172e81558124c.js\\"></script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
"
|
||||
`;
|
|
@ -1,21 +0,0 @@
|
|||
{
|
||||
"main.js": "-/static/main.9be80fd172e81558124c.js",
|
||||
"runtime.js": "-/static/runtime.9be80fd172e81558124c.js",
|
||||
"NotFound.js": "-/static/NotFound.9be80fd172e81558124c.js",
|
||||
"Provider.js": "-/static/Provider.9be80fd172e81558124c.js",
|
||||
"Version.js": "-/static/Version.9be80fd172e81558124c.js",
|
||||
"Home.js": "-/static/Home.9be80fd172e81558124c.js",
|
||||
"Versions.js": "-/static/Versions.9be80fd172e81558124c.js",
|
||||
"UpLinks.js": "-/static/UpLinks.9be80fd172e81558124c.js",
|
||||
"Dependencies.js": "-/static/Dependencies.9be80fd172e81558124c.js",
|
||||
"Engines.js": "-/static/Engines.9be80fd172e81558124c.js",
|
||||
"Dist.js": "-/static/Dist.9be80fd172e81558124c.js",
|
||||
"Install.js": "-/static/Install.9be80fd172e81558124c.js",
|
||||
"Repository.js": "-/static/Repository.9be80fd172e81558124c.js",
|
||||
"vendors.js": "-/static/vendors.9be80fd172e81558124c.js",
|
||||
"vendors-node_modules_pnpm_material-ui_core_4_11_2_react-dom_16_13_1_react_16_13_1_node_module-2c2376.9be80fd172e81558124c.js": "-/static/vendors-node_modules_pnpm_material-ui_core_4_11_2_react-dom_16_13_1_react_16_13_1_node_module-2c2376.9be80fd172e81558124c.js",
|
||||
"vendors-node_modules_pnpm_material-ui_core_4_11_2_react-dom_16_13_1_react_16_13_1_node_module-a68215.9be80fd172e81558124c.js": "-/static/vendors-node_modules_pnpm_material-ui_core_4_11_2_react-dom_16_13_1_react_16_13_1_node_module-a68215.9be80fd172e81558124c.js",
|
||||
"vendors-node_modules_pnpm_material-ui_core_4_11_2_react-dom_16_13_1_react_16_13_1_node_module-3c0585.9be80fd172e81558124c.js": "-/static/vendors-node_modules_pnpm_material-ui_core_4_11_2_react-dom_16_13_1_react_16_13_1_node_module-3c0585.9be80fd172e81558124c.js",
|
||||
"favicon.ico": "-/static/favicon.ico",
|
||||
"index.html": "-/static/index.html"
|
||||
}
|
|
@ -1,77 +0,0 @@
|
|||
import renderTemplate from '../../../../src/api/web/html/template';
|
||||
|
||||
const manifest = require('./partials/manifest/manifest.json');
|
||||
|
||||
const exampleManifest = {
|
||||
css: ['main.css'],
|
||||
js: ['runtime.js', 'main.js'],
|
||||
ico: '/static/foo.ico',
|
||||
};
|
||||
|
||||
describe('template', () => {
|
||||
test('custom render', () => {
|
||||
expect(
|
||||
renderTemplate(
|
||||
{ options: { base: 'http://domain.com' }, manifest: exampleManifest },
|
||||
manifest
|
||||
)
|
||||
).toMatchSnapshot();
|
||||
});
|
||||
|
||||
test('custom title', () => {
|
||||
expect(
|
||||
renderTemplate(
|
||||
{ options: { base: 'http://domain.com', title: 'foo title' }, manifest: exampleManifest },
|
||||
manifest
|
||||
)
|
||||
).toMatchSnapshot();
|
||||
});
|
||||
|
||||
test('custom title', () => {
|
||||
expect(
|
||||
renderTemplate(
|
||||
{ options: { base: 'http://domain.com', title: 'foo title' }, manifest: exampleManifest },
|
||||
manifest
|
||||
)
|
||||
).toMatchSnapshot();
|
||||
});
|
||||
|
||||
test('meta scripts', () => {
|
||||
expect(
|
||||
renderTemplate(
|
||||
{
|
||||
options: { base: 'http://domain.com' },
|
||||
metaScripts: [`<style>.someclass{font-size:10px;}</style>`],
|
||||
manifest: exampleManifest,
|
||||
},
|
||||
manifest
|
||||
)
|
||||
).toMatchSnapshot();
|
||||
});
|
||||
|
||||
test('custom body after', () => {
|
||||
expect(
|
||||
renderTemplate(
|
||||
{
|
||||
options: { base: 'http://domain.com' },
|
||||
scriptsBodyAfter: [`<script src="foo"/>`],
|
||||
manifest: exampleManifest,
|
||||
},
|
||||
manifest
|
||||
)
|
||||
).toMatchSnapshot();
|
||||
});
|
||||
|
||||
test('custom body before', () => {
|
||||
expect(
|
||||
renderTemplate(
|
||||
{
|
||||
options: { base: 'http://domain.com' },
|
||||
scriptsbodyBefore: [`<script src="fooBefore"/>`, `<script src="barBefore"/>`],
|
||||
manifest: exampleManifest,
|
||||
},
|
||||
manifest
|
||||
)
|
||||
).toMatchSnapshot();
|
||||
});
|
||||
});
|
Loading…
Reference in a new issue