mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-01-19 14:13:34 +01:00
Added test-and-release
This commit is contained in:
parent
107598b4b3
commit
cb56ec0c17
2 changed files with 22 additions and 4 deletions
|
@ -159,7 +159,7 @@ const logger = log4js.getLogger('checkPlugin');
|
|||
if (!files.includes('.git')) throw new Error('No .git folder, aborting');
|
||||
prepareRepo();
|
||||
|
||||
const workflows = ['backend-tests.yml', 'frontend-tests.yml', 'npmpublish.yml'];
|
||||
const workflows = ['backend-tests.yml', 'frontend-tests.yml', 'npmpublish.yml', ''];
|
||||
await Promise.all(workflows.map(async (fn) => {
|
||||
await checkFile(`bin/plugins/lib/${fn}`, `.github/workflows/${fn}`);
|
||||
}));
|
||||
|
@ -236,7 +236,7 @@ const logger = log4js.getLogger('checkPlugin');
|
|||
if (!files.includes('package-lock.json')) {
|
||||
logger.warn('package-lock.json not found');
|
||||
if (!autoFix) {
|
||||
logger.warn('Run npm install in the plugin folder and commit the package-lock.json file.');
|
||||
logger.warn('Run pnpm install in the plugin folder and commit the package-lock.json file.');
|
||||
} else {
|
||||
logger.info('Autofixing missing package-lock.json file');
|
||||
execSync('pnpm install', {
|
||||
|
@ -366,7 +366,7 @@ const logger = log4js.getLogger('checkPlugin');
|
|||
|
||||
// Install dependencies so we can run ESLint. This should also create or update package-lock.json
|
||||
// if autoFix is enabled.
|
||||
const npmInstall = `npm install${autoFix ? '' : ' --no-package-lock'}`;
|
||||
const npmInstall = `pnpm install${autoFix ? '' : ' --no-package-lock'}`;
|
||||
execSync(npmInstall, {stdio: 'inherit'});
|
||||
// Create the ep_etherpad-lite symlink if necessary. This must be done after running `npm install`
|
||||
// because that command nukes the symlink.
|
||||
|
@ -383,7 +383,7 @@ const logger = log4js.getLogger('checkPlugin');
|
|||
execSync(lintCmd, {stdio: 'inherit'});
|
||||
} catch (e) {
|
||||
// it is gonna throw an error anyway
|
||||
logger.info('Manual linting probably required, check with: npm run lint');
|
||||
logger.info('Manual linting probably required, check with: pnpm run lint');
|
||||
}
|
||||
// linting ends.
|
||||
|
||||
|
|
18
bin/plugins/lib/test-and-release.yml
Normal file
18
bin/plugins/lib/test-and-release.yml
Normal file
|
@ -0,0 +1,18 @@
|
|||
name: Node.js Package
|
||||
on: [push]
|
||||
|
||||
|
||||
jobs:
|
||||
backend:
|
||||
uses: ./.github/workflows/backend-tests.yml
|
||||
secrets: inherit
|
||||
frontend:
|
||||
uses: ./.github/workflows/frontend-tests.yml
|
||||
secrets: inherit
|
||||
release:
|
||||
if: ${{ github.ref == 'refs/heads/master'|| github.ref == 'refs/heads/main' }}
|
||||
needs:
|
||||
- backend
|
||||
- frontend
|
||||
uses: ./.github/workflows/npmpublish.yml
|
||||
secrets: inherit
|
Loading…
Reference in a new issue