Zulip 服务器和 Web 应用程序。开源团队聊天可帮助团队保持高效和专注。
Go to file
Priyank Patel 650ec29859 github-actions: Use stratergy and if to deduplicate steps.
This is a fine solution short-term until github implements the
yaml anchors support. The limitation of this method is that we
cannot re-use most of the steps again for production install test
builds.

Thanks, Anders for this solution.

Verifying everything is migrated correctly is a pain. This script
ensures everything is done correctly (previous commit message
contains explainations for the steps being ignored if; in case
of github-actions steps they are ignored because they are actions
specific):
"""
This script prints out the ignore steps first. Then
prints out each step of both circle and actions side-by-side.
One step is out of order for bionic but verfying correction is
still easier. Format:
Actions: Install dependencies
Circle CI: install dependencies
....
"""
import yaml

with open('.circleci/config.yml') as f:
    circleci_config = yaml.safe_load(f)

with open('.github/workflows/zulip-ci.yml') as f:
    actions_config = yaml.safe_load(f)

circle_bionic_steps = []
circle_focal_steps = []
actions_bionic_steps = []
actions_focal_steps = []

"""
We ignore casper artifact upload, save_cache, and
store_tests_reports steps.
"""
def get_circleci_steps(job, arr):
    for step in circleci_config['jobs'][job]['steps']:
        if isinstance(step, str):
            arr.append(step)
            continue

        step_name = step.get('run', {}).get('name', False)
        if not step_name:
            if step.get('restore_cache'):
                key = step['restore_cache']['keys'][0].split('.')[0]
                step_name = f'<restore-cache> {key}'
            elif step.get('store_artifacts', False):
                destination = step['store_artifacts']['destination']
                step_name = f'<store-artificats> {destination}'

                if destination == 'casper':
                    \# This is no longer needed
                    print('Ignoring step:')
                    print(step)
                    print()
                    continue
            else:
		"""
                We don't care about save_cache; github-actions
                does this automatically, and store_tests_reports
                is circelci timing specific.
		"""
                print('Ignoring step:')
                print(step)
                print()
                continue

        if step_name != 'On fail':
            arr.append(step_name)

get_circleci_steps('bionic-backend-frontend', circle_bionic_steps)
get_circleci_steps('focal-backend', circle_focal_steps)

""" We ignore there steps specific to github-actions"""
for step in actions_config['jobs']['focal_bionic']['steps']:
    BOTH_OS = 'BOTH_OS'
    if_check = step.get('if', BOTH_OS)
    step_name = step.get('name')

    if step_name is None:
        step_name = step['uses']

    if (
        step_name == 'Upgrade git for bionic' or
        step_name == 'Add required permissions' or
        step_name == 'Move test reports to var'
    ):
        print('Ignoring step:')
        print(step)
        print()
        """These are github-actions specific; see comments"""
        continue

    if if_check == BOTH_OS:
        actions_bionic_steps.append(step_name)
        actions_focal_steps.append(step_name)
    elif 'is_bionic' in if_check:
        actions_bionic_steps.append(step_name)
    else:
        actions_focal_steps.append(step_name)

bionic = zip(circle_bionic_steps, actions_bionic_steps)
focal = zip(circle_focal_steps, actions_focal_steps)

print('Bionic steps:')
for (circle_step, actions_step) in bionic:
    print(f'CircleCI: {circle_step}')
    print(f'Actions: {actions_step}')
    print()

print('Focal steps:')
for (circle_step, actions_step) in focal:
    print(f'CircleCI: {circle_step}')
    print(f'Actions: {actions_step}')
    print()
2020-07-06 18:09:15 -07:00
.circleci ci: Test upgrading PostgreSQL 10 -> 12. 2020-06-29 17:18:47 -07:00
.github github-actions: Use stratergy and if to deduplicate steps. 2020-07-06 18:09:15 -07:00
.tx cleanup: Delete trailing newlines. 2019-08-06 23:29:11 -07:00
analytics audit_log: Log acting_user in do_change_user_role. 2020-07-06 17:32:11 -07:00
confirmation python: Convert more percent formatting to Python 3.6 f-strings. 2020-06-14 23:27:22 -07:00
corporate pointer: Remove pointer from UserProfile. 2020-07-03 13:08:40 +00:00
docs audit_log: Log RealmAuditLog in do_set_realm_authentication_methods. 2020-07-06 17:38:20 -07:00
frontend_tests timestamp: Extract and improve timerender.get_timestamp_for_flatpickr. 2020-07-06 15:53:56 -07:00
locale i18n: Update translation data from Transifex. 2020-07-01 17:47:24 -07:00
pgroonga migrations: Escape more pedantically in pgroonga.0003_v2_api_upgrade. 2020-06-13 21:50:37 -07:00
puppet puppet: Add an exec rule to reload the whole supervisor config. 2020-07-01 10:40:54 -07:00
requirements requirements: Upgrade Thumbor to 7.0.0a5 on Python 3. 2020-07-06 16:09:53 -07:00
scripts requirements: Upgrade Thumbor to 7.0.0a5 on Python 3. 2020-07-06 16:09:53 -07:00
static timestamp: Extract and improve timerender.get_timestamp_for_flatpickr. 2020-07-06 15:53:56 -07:00
stubs pysa: Introduce sanitizers, models, and inline marking safe. 2020-06-11 12:57:49 -07:00
templates timestamp: Update docs to advertise new syntax and other time formats. 2020-07-06 15:53:56 -07:00
tools provision: Do service <service-name> start instead of restart. 2020-07-06 18:09:15 -07:00
zerver audit_log: Log RealmAuditLog in do_set_realm_authentication_methods. 2020-07-06 17:38:20 -07:00
zilencer audit_log: Log RealmAuditLog when Stream is created. 2020-07-06 17:32:11 -07:00
zproject audit_log: Log acting_user in user creation and user activation. 2020-07-06 17:32:09 -07:00
zthumbor thumbor: Replace comment type annotations with normal annotations. 2020-07-06 16:09:53 -07:00
.browserslistrc webpack: Transpile JS code with Babel. 2019-07-22 17:55:32 -07:00
.codecov.yml codecov: Change threshold to use percentage syntax. 2019-07-20 14:37:04 -07:00
.editorconfig .editorconfig: Add .scss, .hbs; drop weirder rules. 2020-04-22 15:03:08 -07:00
.eslintignore blueslip: Apply ESLint. 2019-11-01 12:13:59 -07:00
.eslintrc.json eslint: Enable comma-dangle for functions. 2020-07-03 16:55:51 -07:00
.gitattributes Revert "gitattributes: Mark yarn.lock as "binary", i.e. suppress diffs." 2019-05-20 19:31:14 -07:00
.gitignore tools: Move CI docker images files into tools/ci. 2020-06-29 16:31:43 -07:00
.gitlint lint: Allow revert commit messages in gitlint. 2018-02-13 09:21:01 -08:00
.isort.cfg requirements: Upgrade isort. 2020-06-26 22:50:01 -07:00
.mailmap mailmap: Add mailmap entry for Aman Agrawal. 2020-05-15 17:11:19 -07:00
.npmignore Add proxy notes to new README.dev.md troubleshooting section. 2016-03-29 21:54:05 -07:00
.pyre_configuration pysa: Add basic .pyre_configuration and taint.config for pysa. 2020-06-11 12:57:49 -07:00
.sonarcloud.properties tools: Configure Zulip to be scannable by SonarCloud. 2020-06-24 12:41:17 -07:00
.stylelintrc lint: Ban color names in CSS. 2019-01-22 15:33:18 -08:00
.yarnrc .yarnrc: Set ignore-scripts true. 2019-08-28 16:15:54 -07:00
babel.config.js babel: Enable loose mode. 2020-02-05 11:52:52 -08:00
CODE_OF_CONDUCT.md docs: Convert many http URLs to https. 2020-03-26 21:35:32 -07:00
CONTRIBUTING.md docs: Update most remaining references to zulipchat.com. 2020-06-08 18:10:45 -07:00
Dockerfile-postgresql base Zulip PostgreSQL Docker container on PGroonga official one 2019-12-30 10:20:25 -08:00
LICENSE docs: Bump copyright year. 2020-04-23 16:04:54 -07:00
manage.py python: Sort imports with isort. 2020-06-11 16:45:32 -07:00
mypy.ini zthumbor: Fix strict_optional errors. 2020-07-06 11:25:48 -07:00
NOTICE license: Move license application notice from LICENSE to NOTICE. 2018-10-02 12:04:44 -07:00
package.json dependencies: Upgrade JavaScript dependencies. 2020-06-07 11:06:57 -07:00
postcss.config.js webpack: Move CSS minification to optimization stage. 2019-09-02 21:58:13 -07:00
README.md docs: Update URLs to use https://zulip.com. 2020-06-08 18:10:45 -07:00
SECURITY.md docs: Create GitHub SECURITY.md file. 2020-06-25 15:23:22 -07:00
tsconfig.json tsconfig: Enable resolveJsonModule. 2020-05-26 23:33:40 -07:00
Vagrantfile vagrant: Remove uartmode1 woarkound. 2020-06-22 14:56:38 -07:00
version.py requirements: Upgrade Thumbor to 7.0.0a5 on Python 3. 2020-07-06 16:09:53 -07:00
yarn.lock dependencies: Upgrade JavaScript dependencies. 2020-06-07 11:06:57 -07:00

Zulip overview

Zulip is a powerful, open source group chat application that combines the immediacy of real-time chat with the productivity benefits of threaded conversations. Zulip is used by open source projects, Fortune 500 companies, large standards bodies, and others who need a real-time chat system that allows users to easily process hundreds or thousands of messages a day. With over 500 contributors merging over 500 commits a month, Zulip is also the largest and fastest growing open source group chat project.

CircleCI branch Coverage Status Mypy coverage GitHub release docs Zulip chat Twitter

Getting started

Click on the appropriate link below. If nothing seems to apply, join us on the Zulip community server and tell us what's up!

You might be interested in:

You may also be interested in reading our blog or following us on twitter. Zulip is distributed under the Apache 2.0 license.