Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Running eslint-remote-tester-runner for each new version published #341

Closed
Belco90 opened this issue Apr 14, 2021 · 9 comments 路 Fixed by #508
Closed

Running eslint-remote-tester-runner for each new version published #341

Belco90 opened this issue Apr 14, 2021 · 9 comments 路 Fixed by #508
Labels
chore Changes that affect the build system, CI config or other changes that don't modify src/test files pinned Pinned for different reasons. Issues with this label won't be flagged as stale by stalebot released

Comments

@Belco90
Copy link
Member

Belco90 commented Apr 14, 2021

@AriPerkkio I forgot to mention: another possibility would be running eslint-remote-tester-runner within this project without blocking the CI at all, that's up to us 馃槃 . So every time we release a new version, we trigger the remote tester runner in parallel and leave it doing its thing to get the report when gets finished. Is that possible? I guess so right?

Originally posted by @Belco90 in #272 (comment)

@Belco90
Copy link
Member Author

Belco90 commented Apr 14, 2021

@MichaelDeBoey @AriPerkkio moving conversation here 馃槄

As discussed I'd go for creating a new action file in this plugin which runs the remote tester. It would be executed on each new package published (not really sure how to hook the CI to this? New tag pushed?), and just by getting a failed pipeline would be enough for us to know something went wrong linting some repo.

Additionally, put the flag in our README.

@Belco90 Belco90 added the chore Changes that affect the build system, CI config or other changes that don't modify src/test files label Apr 14, 2021
@AriPerkkio
Copy link
Contributor

and just by getting a failed pipeline would be enough for us to know something went wrong

The eslint-remote-tester-run-action will create a new issue in the repository it is configured in when errors are found. There's no need to check pipeline or its logs for errors. Example from eslint-plugin-unicorn: Results of weekly scheduled smoke test #1122

It would be executed on each new package published (not really sure how to hook the CI to this?

There's the release workflow event which can be used. So in the smoke-test.yml you would have:

For example, you can run a workflow when a release has been published.

on:
 release:
   types: [published]

@Belco90
Copy link
Member Author

Belco90 commented Apr 15, 2021

@AriPerkkio oooh I see! Even better then. I'll work on this after I get pending issues solved (unless @MichaelDeBoey wants to take care of it now)

@AriPerkkio
Copy link
Contributor

Here is example of integration for reference:
jsx-eslint/eslint-plugin-react#2963

Following the setup from first commit should be enough.

When deciding which rules to include and which rule settings, try to cover as many branches of the code as possible. The configuration doesnt have to "make sense", e.g. you can mix react and angular rules in same setup. Goal is to test all rules as widely as possible.

@MichaelDeBoey
Copy link
Member

MichaelDeBoey commented Apr 25, 2021

@AriPerkkio is it also possible to somehow export a baseConfig that we can just extend, like you do in your own eslint-plugin-testing-library.config.js file please?

That way we don't have to bother about all the config stuff (like repositories, pathIgnorePattern, extensions, rulesUnderTesting, concurrentTasks, cache & default eslintrc stuff) and can just extend the eslintrc config with plugin & rules?

This can also be something that eslint-remote-tester-run-action handles by doing a deep merge of our config with the CI config, so you don't have export that baseConfig. (this is what I think is the best approach for it)

@AriPerkkio
Copy link
Contributor

I'm not really planning on providing a base configuration - the default values of configuration are for that. Ideas for improving these are definitely welcome. 馃憤

For repositories and pathIgnorePattern there is eslint-remote-tester-repositories available. All that you'll need to configure is cache, extensions and eslintrc:

const { getRepositories, getPathIgnorePattern } = require('eslint-remote-tester-repositories');

module.exports = {
    repositories: getRepositories({ randomize: true }),
    pathIgnorePattern: getPathIgnorePattern(),
    cache: false, // This should probably be set by eslint-remote-tester-run-action automatically 馃 
    extensions: ['js', 'jsx', 'ts', 'tsx'], // This should probably be default value in eslint-remote-tester 馃 
    eslintrc: {
        // This is really plugin specific and should not be provided by eslint-remote-tester
    }
};

@MichaelDeBoey
Copy link
Member

@AriPerkkio I would not suggest doing that in eslint-remote-tester, but rather in eslint-remote-tester-run-action.

I'll create an issue on the repo to discuss it further there.

@stale
Copy link

stale bot commented Jun 24, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix This will not be worked on label Jun 24, 2021
@MichaelDeBoey MichaelDeBoey added pinned Pinned for different reasons. Issues with this label won't be flagged as stale by stalebot and removed wontfix This will not be worked on labels Jun 24, 2021
@AriPerkkio AriPerkkio mentioned this issue Nov 29, 2021
3 tasks
@github-actions
Copy link

github-actions bot commented Dec 1, 2021

馃帀 This issue has been resolved in version 5.0.1 馃帀

The release is available on:

Your semantic-release bot 馃摝馃殌

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore Changes that affect the build system, CI config or other changes that don't modify src/test files pinned Pinned for different reasons. Issues with this label won't be flagged as stale by stalebot released
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants