GithubHelp home page GithubHelp logo

lombiq / open-source-orchard-core-extensions Goto Github PK

View Code? Open in Web Editor NEW
40.0 12.0 19.0 54.47 MB

Looking for some useful Orchard Core extensions? Here's a bundle solution of all of Lombiq's open-source Orchard Core extensions (modules and themes). Clone and try them out!

Home Page: https://lombiq.com

License: BSD 3-Clause "New" or "Revised" License

C# 98.05% PowerShell 0.54% SCSS 0.03% JavaScript 1.37%
orchard orchard-core orchard-cms orchard-module orchard-theme

open-source-orchard-core-extensions's Introduction

Lombiq's Open-Source Orchard Core Extensions

Build and Test Build and Test Windows GitHub commit activity GitHub last commit GitHub contributors

About

Looking for some useful Orchard Core extensions? Here's a bundle solution of all of Lombiq's open-source Orchard Core extensions (modules and themes). Clone and try them out!

This is an Orchard Core Visual Studio solution that contains most of Lombiq's open-source Orchard modules and themes, as well as related utilities and libraries. Please keep in mind that only those extensions are included which use the latest released version of Orchard (i.e. the very cutting-edge ones depending on a nightly build are not yet here).

This also serves as an example of an ASP.NET Core web app using Orchard from NuGet.

Note that this solution also has an Orchard 1 counterpart, Lombiq's Open-Source Orchard Extensions.

Prerequisites and getting started

  • You need Node.js for building client-side assets in multiple projects. Check out Lombiq Node.js Extensions Readme for details.
  • To develop and test scripts written in PowerShell, install and use PowerShell 7 instead of Windows PowerShell (i.e., up to version 5.x). Static code analysis is only executed through PowerShell 7.
  • Since the extensions are included as git submodules when cloning this repo be sure to initialize submodules: When using a GUI this will most possibly happen by default, and when using the command line use the --recurse-submodules switch. If you cloned without initializing submodules, then you can run git submodule update --init --recursive to initialize them later.

Included Projects

  • Libraries

  • Modules

  • Themes

  • Utilities

    • Lombiq.NodeJs.Extensions: Configurable and MSBuild-integrated frontend asset pipelines for SCSS, JS, MD, and external libraries implemented using npm scripts. Uses NPM Targets under the hood.
    • Lombiq.Npm.Targets: Provides automatic NPM package installation and a custom NPM command execution before building a .NET project. This way it is possible for example to manage assets (e.g. .scss files or images) in a folder that will be automatically compiled into the wwwroot folder on build, which then can be excluded from the version control system.
    • Lombiq.SetupExtensions: Extensions for setting up an Orchard Core application.
    • Lombiq.Hosting.MediaTheme.Targets: Provides automatic Media Theme package creation during build.
  • Testing

    • Lombiq.Tests: General and unit testing extensions and helpers, mostly for ASP.NET Core and Orchard Core. Also see our UI Testing Toolbox.
    • Lombiq.Tests.UI: Web UI testing toolbox mostly for Orchard Core applications. Everything you need to do UI testing with Selenium for an Orchard app is here.
    • Lombiq.Tests.UI.AppExtensions: UI testing-related configuration extensions for the web app under test. Note that the module depends on Helpful Libraries.
    • Lombiq.Tests.UI.Samples: Example UI testing project. The whole project is heavily documented to teach you how to write UI tests with the UI Testing Toolbox. It guides you through this process just like the Lombiq Training Demo for Orchard Core teaches Orchard Core and Orchard 1 development.
    • Lombiq.Tests.UI.Shortcuts: Provides some useful shortcuts for common operations that UI tests might want to do or check, e.g. turning features on or off, or logging in users. This way, UI tests needn't use multi-step UI processes to do these operations (and thus implicitly be coupled with and tests those features). Note that the module depends on Helpful Libraries.
  • Tools

    • Lombiq.Analyzers: .NET code analyzers and code convention settings for Lombiq projects, predominantly for Orchard Core apps but also any .NET apps. We use these to enforce common standards across all our .NET projects, including e.g. all of our open-source Orchard Core extensions.
    • Lombiq.Analyzers.PowerShell: PowerShell static code analysis via PSScriptAnalyzer and Lombiq's recommended configuration for it. Use it from the CLI, in GitHub Actions, or integrated into MSBuild builds.
    • Lombiq.GitHub.Actions: Some common workflows and actions for GitHub Actions shared between Lombiq projects, e.g. to build and test Orchard Core apps, publish packages to NuGet, verify that a Git submodule pull request has a corresponding superproject one. These can be invoked from any other repository's build.

Samples and Recipes

You can activate various sample content in the site:

  • Lombiq.JsonEditor: Go to Recipes in the admin dashboard and select "Lombiq Open Source Orchard Core Extensions - JSON Editor Sample".
    • Content Items > JSON Example Page: Shows the sample item in action. Edit shows the JSON Editor where you can change the JSON value. View demonstrates simple JavaScript consuming the JSON content.
    • Content Definition > Content Types > JSON Example Page > JsonExampleField: You can edit the this field's JSON Editor's configuration object here. Check out the Templates property!
  • Lombiq.UITestingToolbox: Web UI testing toolbox mostly for Orchard Core applications. Check out its samples in this solution.
  • Lombiq.TrainingDemo: Select the Training Demo setup recipe when you first run the site.
  • Lombiq.DataTables:
    • Go to Features in the admin dashboard and select "Lombiq Data Tables - Samples".
    • Go to Recipes in the admin dashboard and select "Lombiq Data Tables - Sample Content - Employee".
  • Lombiq.BaseTheme:
    • The "TEST: Basic Orchard Features" setup recipe automatically sets it up. If not using it, run the "Lombiq Orchard Core Base Theme - Layers and Zones" recipe, and then enable the theme in Admin → Design → Themes.
    • In case of theme development you can use the "Lombiq Orchard Core Base Theme - Styling Demo" theme to test against some common HTML elements.
  • Lombiq.ChartJs: Go to Recipes in the admin dashboard and select "Lombiq Chart.js - Sample Content - Income/Expense".
  • Lombiq.Privacy: Go to Recipes in the admin dashboard and select "Lombiq Privacy - Sample Content - Privacy, Forms, Workflows".
  • Lombiq.Hosting.MediaTheme: Go to Recipes in the admin dashboard and select "Lombiq Hosting - Media Theme - Samples".

Contributing and support

Bug reports, feature requests, comments, questions, code contributions and love letters are warmly welcome. You can send them to us via GitHub issues and pull requests. Please adhere to our open-source guidelines while doing so.

This project is developed by Lombiq Technologies. Commercial-grade support is available through Lombiq.

Adding a new extension or significant new features

When adding a new extension, or significant new features to existing extensions, do the following:

  • For user-facing features add a recipe to it, demonstrating its usage with sample data. In that case, refer to it in the above section.
  • If no data is needed or if the feature is more library-like, add a sample project (or in addition to the recipe). Put this project into the root of the submodule, so to have the main project's and sample project's folders side by side.
  • Add lower-level unit/integration tests as necessary with the Lombiq Testing Toolbox for Orchard Core.
  • If the sample project includes MVC actions, create a service that inherits from MainMenuNavigationProviderBase and adds front-end main menu items. The top level menu item should have the project's shortened name and the submenu items the individual actions. If you have several controllers, use separators and labels as you can see in the TrainingDemoNavigationProvider.cs.
  • If the feature is user-facing, also add UI test extension method(s) with the Lombiq UI Testing Toolbox for Orchard Core that assert on some important aspects, and execute them from a new UI test in Lombiq.OSOCE.Tests.UI (for inspiration, see the examples there). These methods are also meant to be executed from UI tests in other projects when testing how it integrated with other features. If you've added a demo recipe or sample project to it then utilize that in the test too (see ExecuteRecipeDirectlyAsync()). For this, you'll also need to enable the feature in Lombiq.OSOCE.Tests.recipe.
  • If the project is published on NuGet, reference it from the app in the Lombiq.OSOCE.NuGet solution as well, and enable its features in the Lombiq.OSOCE.NuGet.Tests.recipe. If it has UI testing methods, also run them from Lombiq.OSOCE.NuGet.Tests.UI.
  • If an extension is added, removed or significantly updated in this project, then add, remove or update its description under the "Included Projects" section of this Readme.

Opening pull requests

  • Open a pull request in this repository for every submodule pull request. That way, static code analysis and complex tests can run. If you forget to do so, a check in the submodule will fail. Once you've created the PR here, just click "Re-run jobs" in your submodule.
  • If you see build errors under your pull request then check out its details: It will send you to the failed step in the Actions tab. You can also click on the "Summary" on the sidebar to download the artifacts (logs, screenshots, etc) and in case of failed UI tests you find the annotations linking to which test failed.
  • Open a pull request for all but trivial changes (like typos) so we can nicely track them, including when generating release notes for the next release.

Dependencies between Lombiq projects

When making a Lombiq project depend on another one from this solution, apart from adding a project reference and dependency in the extension manifest for Orchard Core extensions, also add a conditional package reference. This way, when published to NuGet, dependencies will still work. See the project file of Lombiq.HelpfulExtensions for an example.

You can just have project references between projects in the same repo though if both projects are published on NuGet (like between projects of the UI Testing Toolbox) since those will be turned into package dependencies automatically.

You can use the NuGetBuild switch in the root Directory.Build.props file to make all projects use NuGet references so you can update Lombiq packages for the whole solution.

open-source-orchard-core-extensions's People

Contributors

0liver avatar adelgeiszt avatar aydine avatar azaliusz avatar barthamark avatar benedekfarkas avatar davidpuplava avatar demeszabolcs avatar dministro avatar domonkosgabor avatar dorraj07 avatar i3undy avatar jtkech avatar lombiqbot avatar luko6 avatar mihalybecsei avatar mzole avatar piedone avatar porgabi avatar psichorex avatar sarahelsaig avatar thehydes avatar tteguayco avatar vtamas1 avatar wasnk avatar yevgeniyshunevych avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

open-source-orchard-core-extensions's Issues

Problem building Lombiq.OSCCE (OSOE-384)

Hi,

I have clone the repo and installed all the pre-req (I think) and I am getting the following error:

"Severity Code Description Project File Line Suppression State
Error MSB3073 The command "pwsh -File C:\Users\User\source\repos\Lombiq2\tools\Lombiq.Analyzers.PowerShell\Lombiq.Analyzers.PowerShell\Invoke-Analyzer.ps1 -ForMsBuild" exited with code 1. Lombiq.OSOCE.Web C:\Users\User\source\repos\Lombiq2\tools\Lombiq.Analyzers.PowerShell\Lombiq.Analyzers.PowerShell\Lombiq.Analyzers.PowerShell.targets 41
"

No sure were to go from here. Any pointers will be appreciated.

Thank you

Jira issue

Detect in submodules if there's no PR here (OSOE-131)

If you change a submodule of this project, then to do integration, code analysis, and run tests, you should also open a PR here (as also mentioned in the docs). We need something to enforce this.

Perhaps have a build for submodules that fails if it doesn't somehow detect a corresponding PR here?

This repo could automatically be updated with submodule changes too but that's after the fact, at that point the changes are already merged.

Test new GitHub-hosted runners (OSOE-773)

From the original announcement:

From now on, any Linux or Windows workflow triggered from a public repository, using GitHub’s default labels, will run on our faster, more powerful 4-vCPU runners.
...
This upgrade offers increased performance, memory, and storage with 4-vCPUs, 16 GiB of memory and 150GiB storage.

Jira issue

Upgrade to Orchard Core 1.5 (OSOE-392)

...once it's released.

  • Lombiq/UI-Testing-Toolbox#133 will need this.
  • Change services.AddScoped<IDataMigration, CustomMigrations>() calls to services.AddDataMigration<CustomMigrations>()
  • You'll get a "System.MissingMethodException: 'Method not found: 'System.Collections.Generic.IDictionary`2<System.String,NLog.Layouts.SimpleLayout> NLog.Config.LoggingConfiguration.get_Variables()'.'" exception until the UI Testing Toolbox's NLog version is not the same as that of Orchard's.

Jira issue

Project not building for me

I cannot seem to get the project to build. I get an error "The command "gulp" exited with code 9009" for both the VueJs and TrainingDemo projects. Could you possibly steer me in the right direction to get this to build?

Update all NuGet packages to latest (OSOE-398)

Update all NuGet packages in the solution to the latest released (not prerelease) version.

  • Since Atata.HtmlValidation now uses HtmlValidationOptions.HtmlValidatePackageVersion = "7.5.0", remove us setting that property in HtmlValidationConfiguration.
  • Perhaps WebDriverManager won't be possible to update until Orchard Core 1.5 is released and we upgrade to that.

Jira issue

Rename Licence.md files to License.md (OSOE-80)

We used British English but since we use American English for everything else, let's rename them. Note that submodule repos with more than one project and published to NuGet have not just a file in the root but in each published project's folder too.

Apart from the file renames, the references for NuGet build in the csprojs need to be adjusted too.

Optimize spell-checking dictionary files across projects (OSOE-523)

Currently https://github.com/Lombiq/GitHub-Actions is the owner spell-checking dictionary files, even for entries specific to OSOCE.

Here are a couple of ideas for improving how OSOCE and other repositories consume spell-checking configuration from LGHA, so there are no hidden dependencies. For example, Utility Scripts and Infrastructure Scripts relies completely on LGHA for its spell-checking dictionaries (most importantly allow.txt and expect.txt), but those are referenced by other repositories too. As a result, spell-checking reports in different repositories have a varying number of irrelevant entries, which makes it harder to maintain them.

With this, OSOCE will be a template for consuming LGHA as they were completely independent.

  1. LGHA should continue to do its own spell-checking, but the allow.txt and expect.txt dictionary files should be specific to LGHA only.
  2. Generic entries should be added to scope-specific files, such as lombiq.txt or orchard.txt and such. Entries that are specific to a submodule of OSOCE can also be considered generic if we can expect that they will be used as a submodule in other repositories too (let's just put them all in osoce.txt?).
  3. OSOCE-specific entries should be added to allow.txt and expect.txt files in its root .github/actions/spelling folder. Unrecognized entries should be removed.
  4. As a result of the previous points, OSOCE should skip LGHA from its own spell-checking.
  5. Other consumer repositories (e.g., Utility Scripts and Infrastructure Scripts) need to be re-checked and some further entries added, so it will be a relatively complex endeavor.
  6. Does LGHA actually need to be a submodule of OSOCE? If it's only used through actions/workflows, then decoupling would make LGHA contributions easier by not having to maintain PRs there too (and breaking changes can occur outside OSOCE, so testing with OSOCE should still happen, but it isn't always enough).

Jira issue

Let's use Central Package Management to simplify NuGet package updates (OSOE-567)

With NuGet 6.2, Central Package Management can provide a much improved experience to manage NuGet packages over many project in a solution (folder).

The feature is available across all NuGet integrated tooling from the following versions:

[Visual Studio 2022 17.2 and later](https://visualstudio.microsoft.com/downloads/)
[.NET SDK 6.0.300 and later](https://dotnet.microsoft.com/download/dotnet/6.0)
[.NET SDK 7.0.0-preview.4 and later](https://dotnet.microsoft.com/download/dotnet/7.0)
[nuget.exe 6.2.0 and later](https://www.nuget.org/downloads)

Jira issue

Set up automated dependency updates (OSOE-815)

Set up some kind of automation to update NPM and NuGet dependencies in all OSOCE projects. If we really want to get fancy, then perhaps Docker dependencies (if we have any directly used ones, e.g. ZAP is not an easy case) as well as dotnet tools (see e.g. this) too.

  • This needs to cover the projects directly in this repo, both in the OSOCE and NuGetTest solutions, as well as all referenced submodules. Once we have a working approach, we'll use it in all non-OSOCE and closed-source apps too.
  • Dependabot can do this. However, we have dozens of repos where we don't want to duplicate configuration, and it seems Dependabots configs can't be DRY (though there are workarounds.
  • Renovate looks like a good tool too, and it supports DRY config as well.
  • We don't want to get too many such PRs, since ultimately, all of them need to be reviewed by a human, perhaps also tested, and in the case of submodules, integrated into OSOCE. So, e.g. make it check dependencies once a month?

Jira issue

Figure out how we can build and NuGet-publish projects that depend on Gulp Extensions (OSOE-84)

Currently, we commit the wwwroot folders instead of building them during publishing with Gulp Extensions, which is bad. Instead, we should build static resources as we do in the OSOCE build, but we can't really do exactly that.

Jira issue

NuGet publishing

Publish our OSS packages to NuGet. Individual issues for the same: Lombiq/Helpful-Extensions#34, Lombiq/Orchard-Azure-Application-Insights#15, Lombiq/UI-Testing-Toolbox#98

First steps:

  • Set up the NuGet publishing with GitHub Actions of https://github.com/Lombiq/Helpful-Libraries and https://github.com/Lombiq/Helpful-Extensions. These will then at a later point serve as models for the rest.
  • These two projects are special, and thus cover all important use cases, because Helpful Extensions depends on Helpful Libraries, and Helpful Libraries contains three csprojs that all need to be published (either as separate packages or one; perhaps the former because other projects may not depend on all of them).
  • We're developing such OSS projects as part of this OSOCE solution. In other projects of ours we use them as submodules too, so consuming and improving them is easier. We'll keep this, thus we need some way for this to not clash with NuGet references.

Some criteria to keep in mind:

  • We can handle the whole thing from a build in OSOCE too somehow, it needn't be for each project, if it makes things easier.
  • Currently, we have about 30 projects that we'd like to publish to NuGet. This already necessitates the ability to manage NuGet publishing somehow centrally in a DRY manner (apart from credentials that can be stored in GitHub secrets) but we'll likely have many more. So, a solution where we need to maintain a pipeline in each of these repositories would be an issue

Disable Jira issue title suffixes for submodules (OSOE-386)

Go through the create-jira-issues-for-community-activities.yml workflows in all submodules, and set suffix-issue-titles: "false". We don't actually need to include the component in the Jira issue titles since it's also readily visible not just in the issue detail view but in the kanban board too.

Jira issue

Normalize line endings to auto across all submodules (OSOE-91)

As discussed here we can get the best cross-platform behavior by using automatic line ending conversion (i.e. "Checkout Windows-style, commit Unix-style" on Windows) on push to have uniform LF endings on the repository and native line endings in the local work tree.

This can be done relatively quickly but it will cause a lot of neutral changes in the PRs with nothing to review so I'd prefer to dedicate an separate issue to it.

Run Windows CI builds only just before merging PRs (OSOE-635)

Windows CI builds are much slower than Ubuntu ones, which makes the feedback loop longer, they need twice the core count to achieve even this, and are twice as expensive per core. So, let's try a setup where CI builds for PRs only run Linux by default. Then, to catch possible incompatibilities, you have to run a Windows build just before merging a PR.

  • We can achieve the Windows build enforcement with branch protection rules. Do make sure this does not break our DX in any other way.
  • CI builds for dev and branches remain as they are.
  • Check whether it makes sense to use a faster Ubuntu runner for a shorter feedback loop, where we can allocate some of the cost savings.

Jira issue

Test branch builds with GitRunners (OSOE-599)

GitRunners is a cheaper and perhaps faster option than using the larger runners GitHub provides. Let's test it for our larger runner builds.

  • It's similar to BuildJet but that was only for Linux and we had issues with those runners being in parity with GitHub's.
  • GitRunners' Linux runner is significantly cheaper: E.g. $0,0128 for a 4-core Linux instead of GitHub's $0,016. They don't offer Windows runners though.
  • "Upcoming features Persistent storage for all ephemeral runners and flamegraph visualizations to analize workflows runtimes." Persistent storage may help us a lot with repeated builds for private repos (due to not having to do a full rebuild, and NuGet/NPM package cache being initialized, faster than with GitHub Actions Cache).

Jira issue

Update all NuGet dependencies (OSOE-532)

  • Update the NuGet dependencies of all OSOCE projects, unless it'd conflict with a version coming from Orchard (like YesSql, Json.NET).
  • Do a release of all of our projects that didn't have a release recetly.

Jira issue

Orchard Core 1.0 upgrade

After upgrading to the Orchard version after RC:

ResourceManifest migration

Sample:

using Microsoft.Extensions.Options;
using OrchardCore.ResourceManagement;

namespace OrchardCore.Facebook
{
    public class ResourceManagementOptionsConfiguration : IConfigureOptions<ResourceManagementOptions>
    {
        private static ResourceManifest _manifest;

        static ResourceManagementOptionsConfiguration()
        {
            _manifest = new ResourceManifest();

            _manifest
                .DefineScript("fb")
                .SetDependencies("fbsdk")
                .SetUrl("~/OrchardCore.Facebook/sdk/fb.js");

            _manifest
                .DefineScript("fbsdk")
                .SetUrl("~/OrchardCore.Facebook/sdk/fbsdk.js");
        }

        public void Configure(ResourceManagementOptions options)
        {
            options.ResourceManifests.Add(_manifest);
        }
    }
}

Registration:

services.AddTransient<IConfigureOptions<ResourceManagementOptions>, ResourceManagementOptionsConfiguration>();

ILayoutAccessor usage

E.g. ShapeInjectionFilter needs to be changed as follows:

            // The layout can be handled easily if this is dynamic.
            var layout = await _layoutAccessor.GetLayoutAsync();

            // The Layout object will contain a Zones dictionary that you can use to access a zone.
            var contentZone = layout.Zones["Content"];
            // Here you can add an ad-hoc generated shape to the content zone. This works in the same way as we've seen
            // previously when we talked about display management. You can find the template that'll render this shape
            // under Views/InjectedShape.cshtml.
            await contentZone.AddAsync(await _shapeFactory.CreateAsync("InjectedShape"));

Publish alpha packages to Cloudsmith (OSOE-649)

Currently, we publish all issue-specific alpha versions of our projects' NuGet packages to nuget.org. Not to pollute NuGet, let’s publish them to Cloudsmith instead.

  • This can be done with a different NuGet publish GHA workflow for non-release (e.g. alpha) version tags. OCC does this with preview tags, see here.
  • Add the necessary NuGet.config to OSOCE to configure the Cloudsmith feed. For projects with a dependency on another project of ours (like Helpful Extensions) this is needed too. We can just auto-add a centrally managed such file to every project, like we do with the Lombiq logo.
  • Add a shield for the Cloudsmith package to the Readme of all projects too.
  • Update our Open-source template too.

Jira issue

Add demos of all modules (OSOE-178)

This solution should also serve as a demo of all our modules. Probably the best would be to add a setup recipe that enables configures everything for a demo so you can better see what's in there. Maybe add some information about what you can access from a content item on the homepage.

Basically, do everything under https://github.com/Lombiq/Open-Source-Orchard-Core-Extensions#adding-a-new-extension-or-significant-new-features for those features that yet lack this.

System.InvalidOperationException : The docker.exe pull softwaresecurityproject/zap-stable:2.14.0 --quiet command failed (OSOE-821)

System.InvalidOperationException : The docker.exe pull softwaresecurityproject/zap-stable:2.14.0 --quiet command failed this error occures whenever I am trying to run any of the SecurityScanningTests on my local machine.
I asked @wAsnk and he confirmed the same thing is happening for him locally. Same error goes locally for the OrchardCore.Commerce solution and NuGet.Test solution.

It is very interesting because we do not experience this on CI neither on Ubuntu nor on Windows builds. At least every OSOCE dev build passed so far and I checked out dev to run tests.

Repro

  1. Run BasicSecurityScanShouldPass on your local machine and the error should occur.

I tried:

  1. Upgrading CliWrap nuget to 3.6.6 did not solve this issue that was my best bet.

I suspect something is off with CliWrap and HelpfulLibraries.Cli atleast the logs are suggesting that the docker daemon might not be running and the generated test log claims that : this error may indicate that the docker daemon is not running: Post "http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.24/images/create?fromImage=softwaresecurityproject%2Fzap-stable&tag=2.14.0": open //./pipe/docker_engine: A rendszer nem találja a megadott fájlt.

Here is the TestOutput.log:
TestOutput.log

Jira issue

Make NuGetTest updates better (OSOE-816)

This is not a fully planned out suggestion, more of a problem statement and opener to think together.

When you change an OSOCE project today, you don't have to publish an alpha NuGet package. This is OK, since not every change warrants an alpha due to it being used in another NuGet solution (or things like docs or sample changes don't need a NuGet release ever).

However, this results in versions used in the NuGetTest package gradually going out of date. That is, until an OC upgrade requires an update to every project, when all potential breaking changes will arrive at once, and you have to fix the NuGetTest solution. Or a project's NuGet publish may fail as well, e.g. due to incomplete project-package references, or something breaking due to the Node build.

A couple of ideas on how to tackle this:

  • Require a NuGet release before approving every submodule PR, if the changes in that PR affect the NuGet package (excluding e.g. the mentioned samples or docs changes). However, this is a chore.
  • Run a NuGet package creation, but without publishing to NuGet.org, for every submodule commit, kind of like a CI build. This would at least prevent introducing NuGet publishing errors.

Related issues that might help here: #703 and Lombiq/GitHub-Actions#70.

Jira issue

Split CI test execution into parallel jobs (OSOE-730)

This is something for the future, when we'll have a lot more (UI) tests, I just wanted to record the idea.

Currently, the Tests step in the CI build takes 8-10 minutes under Ubuntu. We have 71 UI tests that take up the bulk of this time. Once we'll have a lot more and, we've exhausted other speed-up options, and we want to make this step faster, we could split the Tests step into two or more parallel jobs. I'd only do this for the Ubuntu build-and-test-larger-runners job.

This requires us to have at least 3 jobs: One that does everything up to Build and Static Code Analysis. Then, it'd upload the build artifacts. Two other (parallel) jobs then would be triggered, download the artifacts, and execute the tests.

We need to employ Cancel Workflow on Failure for each of these jobs still.

This would allow us to have two separate VMs running the tests in parallel.

Jira issue

Update GitHub Actions workflows of all OSOCE projects from the OSS template (OSOE-485)

The GitHub Actions workflows of our open-source repository template now contain various smaller fixes, including but not necessarily limited to:

  • The types parameter of GitHub Actions workflows should be arrays, even if they contain a single type, see the docs. E.g. it should be [created], not created, even though the latter works too. The create-jira-issues-for-community-activities workflow didn't comply with this.
  • The job names were fixed to relate to what the job actually does (there were copy-paste errors).
  • validate-submodule-pull-request is now validate-pull-request, and its content also changed, but it still only executes the validate-submodule-pull-request workflow.

So, let's go through all OSOCE projects, and update these workflows from the template. Note that all three workflows may contain project-specific configuration, and create-jira-issues-for-community-activities at least has a unique issue-component for each project. So, simply overwriting the files is not enough, these configurations need to be retained.

Jira issue

Upgrade to latest OC preview to test System.Text.Json (OSOE-795)

After OrchardCMS/OrchardCore#14572, OC now uses System.Text.Json instead of Json.NET. So, let's upgrade to this preview version and test if anything is broken.

Jira issue

.NET 6 upgrade (OSOE-60)

Let's upgrade everything to .NET 6. Official docs: https://docs.microsoft.com/en-us/aspnet/core/migration/31-to-60

  • The best is to wait for OC 1.3 with this since that's the version that'll drop .NET Core 3.1 support.
  • NPM Targets and Gulp Extensions, due to being used in Orchard 1 and other .NET Framework projects, should target .NET Standard still.
  • Search the whole code base not just for "netcoreapp3.1" but also "net5.0".

Related:

Failed to start project.

Environment:
IDE: visual studio 2022
Node: 14.15.0
npm: 6.14.12

The operation of gulp keeps reporting errors

The screenshot of the error is as follows
图片

Can you help me? thank you so much.

Update all packages to latest (OSOE-620)

...in all submodules too, once #378 is done.

  • When a UI test fails, currently an HTML snapshot is saved into the FailureDumps folder. This should rather be an MHTML with compatible Chromium browsers. This worked before but now it appears to revert back to HTML, perhaps due to some Chrome change. If this happens with the latest Atata too, then report it here.
  • Microsoft.AspNetCore.Http is now deprecated. Remove it and use a substitute if necessary.
  • Don't forget about the NuGetTest solution.

Jira issue

Named FlowPart? (OSOE-824)

Is it possible to have more than one/a named FlowPart on a Content Item? I currently have a "page" which contains a flow part along with several other fields. I would like to do something like this when rendering.

Top FlowPart

Field 1
Field 2

Bottom FlowPart

Field3
Field4

Jira issue

Use custom VM images for CI builds (OSOE-717)

Once github/roadmap#826 is available, let's use custom VM images for CI builds.

The image used for .NET builds should contain all build dependencies preinstalled, as well as an OSOCE source built that'll be updated on checkout (or if that's not possible, then re-cloned, but still, we'd have the NuGet and NPM caches warm). Perhaps saving OSOCE after also a test run would be useful, to let the UI Testing Toolbox install its dependencies (smtp4dev, Zap) too.

This should be regenerated when OSOCE dev changes; most possibly, after every dev commit it'd be wasteful, but perhaps once every day if there are new dev commits.

Once this works with package caches, package caching in the build workflow can be disabled.

If this works out well, we can introduce it in all other projects of ours too.

Related:

Jira issue

Evaluate NDepend (OSOE-135)

NDepend is a .NET code quality tool. We've received 4 licenses due to the generosity of NDepend's founder, Patrick Smacchia. Let's try NDepend on OSOCE:

  • Show what kind of issues it finds and evaluate whether there are features in NDepend we can benefit from using in the long-term.
  • Create issues for the findings in each repo.
  • Demonstrate running it in CI with GitHub Actions if it's possible.
  • Summarize our experiences here in form of a comment in about 3-4 paragraphs.

List of projects in the root Readme (OSOE-73)

Let's add a list of all included projects to the root Readme.

  • A hierarchical (similar to the solution structure, e.g. Modules, Test...) list of all included modules with their names, GitHub links, short description (from their Readmes).
  • Add a note about extending this under "Adding a new extension or significant new features".

Related: #7

Fix test execution sometimes hanging (OSOE-129)

Sometimes, for seemingly no good reason, the Tests step hangs and times out if we let it run. Let's fix this.

  • See e.g.:
    • This build, logs:
      logs_364.zip. Happened on Ubuntu.
    • This one happened on Windows. Logs:
      logs_334.zip
    • Another one, ironically happened when setting the workflow timeout as a stopgap to prevent them from running for 6 hours.
    • See others under canceled Actions (note that cancellation can be by the user's request too, a run is only interesting if it took one hour and was canceled by the system).
  • It seems that the test run doesn't even start dotnet test. Maybe a command before that is hanging.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.