Skip to content
This repository has been archived by the owner on Jul 15, 2023. It is now read-only.

Set up CI with Azure Pipelines #655

Closed
wants to merge 214 commits into from
Closed

Conversation

lupine86
Copy link

@lupine86 lupine86 commented Nov 20, 2018

PR checklist

Overview of change:

Add support for CI using Azure Pipelines

Is there anything you'd like reviewers to focus on?

I have created a new organization and project on Azure Devops to support the tslint-microsoft-contrib project here: https://dev.azure.com/tslint-microsoft-contrib/
I invited Joshua Goldberg and Hamlet D'Arcy and made them collection level admins.

image

image

@IllusionMH
Copy link
Contributor

Is it possible to setup more node version and probably Windows builds too?

Looks a bit strange to test only against Node 8 while Node 10 is latest LTS.

@JoshuaKGoldberg
Copy link

Hi @lupine86, thanks for sending this in! Normally we track suggested changes in issues before accepting PRs; is there a particular reason you want this in?

@JoshuaKGoldberg JoshuaKGoldberg added Status: In Discussion Please continue discussing the proposed change before sending a pull request. PR: Waiting for Author Changes have been requested that the pull request author should address. Status: Awaiting More Feedback Domain: Tooling Repository tasks around improving source tooling. labels Nov 21, 2018
@IllusionMH
Copy link
Contributor

Also worth to add: there are new npm tasks that should generate report from Mocha. However #489 will migrate almost all test away from Mocha, and only test for few utils and deprecated formatters will left as mocha tests. I do not think that it worth it to have report just for them.

@lupine86
Copy link
Author

Add #656 to track community discussion.

@JoshuaKGoldberg
Copy link

Per #656: anything we switch to would need to have feature parity with what we have now in OS and Node versions.

Per #489: tslint-microsoft-contrib is going to get rid of its older rule tests and fully switch to TSLint core's. We can save some work by finishing that work first.

Copy link

@JoshuaKGoldberg JoshuaKGoldberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I put some comments here and in #656

Josh Goldberg and others added 15 commits February 26, 2019 11:25
* Validate order of rules in README.md (fixes microsoft#816)

* Fix rules order in README.md

* create-rule task also updates README (fixed microsoft#816)

* Update CONTRIBUTING.md with detais about README.md actions (fixes microsoft#648)
* Replace Release Notes with info about CHANGELOG.md and Releases

* Replace Release Notes with links to CHANGELOG.md and Releases

* Updated Releases (markdown)

* Revert "Updated Releases (markdown)"

This reverts commit b9214fd89cc3cd2238a4f43c3c4bf7ac3c2cc7e9.

* Add instruction to replace @next placeholder

* Move Wiki files to docs folder (fixes microsoft#808)

* Apply Prettier formatter to docs

* Update link to Releases doc

* Replace Markdown table format with HTML table

* Add links from removed Releases page to README.md
)

* ported react-unused-props-and-state tests to new test framework

* removed react-unused-props-and-state tests from old framework
…icrosoft#809)

* Revamped configs into 'core', 'latest', and (legacy) 'recommended'

Those three config files now exist as `.json` under `/configs`; they're copied to `dist/build/configs`. `recommended.json` becomes `tslint.json` as well.

* Normalized trailing commas; added back .gitignore fields

* Moved void-zero to latest.json

* Moved to exporting root-level configs

* Switched to auto-generating latest.json

* Aligned naming with TSLint's recommended -> latest

* Update ExtendedMetadata.ts
:qa!

rebasing
:wq

:qa!
…mponents (microsoft#824)

* added suite of tests to cover function components

* traverse found arrow functions, function declarations and expressions

* add helper functions to extract type information

* wireup logic to traverse arrow functions and function components

* reorganized tests to help with understanding coverage

* check shorthand types for React function components

* update comment
Copy link

@JoshuaKGoldberg JoshuaKGoldberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for sending this in! A few things to touch up, but it looks like it's on its way.

.azure-pipelines-steps.yml Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
azure-pipelines.yml Show resolved Hide resolved
@@ -89,7 +91,8 @@
"lint-staged": "^8.0.4",
"mkdirp": "^0.5.1",
"mocha": "5.2.0",
"npm-run-all": "^4.1.5",
"mocha-junit-reporter": "^1.18.0",
"npm-run-all": "^4.1.3",

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like a merge hiccup: npm-run-all in this repo is now up to 4.1.5, not 4.1.3.

package.json Outdated
@@ -62,9 +62,11 @@
"lint:tests": "tslint -p tsconfig.json -t stylish -c src/tests/tslint.json -e src/tests/references.ts \"src/tests/**/*.ts\"",
"prettier": "prettier --write \"**/*.{js,ts,tsx,json,md}\"",
"start": "npm-run-all clean copy:json watch:src",
"test:mocha": "mocha \"dist/src/tests/**/*.js\" --timeout 5000",
"test:mocha": "mocha \"dist/src/tests/**/*.js\" --timeout 5000 --reporter mocha-junit-reporter",

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you'll want to take another look at the changes to these tasks. Seems like test:mocha changes should be reverted, as test-junit reports with the junit reporter?

package.json Outdated Show resolved Hide resolved
# Node.js
# Build a general Node.js project with npm.
# Add steps that analyze code, save build artifacts, deploy, and more:
# https://docs.microsoft.com/azure/devops/pipelines/languages/javascript

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: header isn't needed; let's remove it.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bump @apawast

@JoshuaKGoldberg
Copy link

@lupine86 One more suggestion: you sent a PR from your master branch, which means pulling in updates to this repository's master branch can be a little annoying. I'd recommend:

  1. Completely resetting your local master to this repository's
  2. Create a new branch, say azure-pipelines, off that reset master
  3. Copying the changes you added in this PR on a commit on that branch
  4. Sending a similar PR from that branch to this repository
  5. Deleting this PR

I'm basing this suggestion off the reported 210 commit difference in your branch on this PR, since it looks like something went wrong in Git land. Apologies if you already knew this!

@apawast
Copy link
Contributor

apawast commented Mar 4, 2019

@JoshuaKGoldberg I've addressed your feedback so far. Please let me know if there's anything else, if not I'll make a new PR and branch. I ran into some issues when I was trying to squash the commits and it had unexpected effects and says I made 210 commits even though they're not mine. The only thing that's different right now is the package-lock.json file but that should fix itself when I reset things.

@JoshuaKGoldberg
Copy link

Yup, looks good! Once the package.json and package-lock.json changes are undone it looks like we can merge this in for testing.

Copy link

@JoshuaKGoldberg JoshuaKGoldberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Other than package merge shenanigans, this looks like the only remaining item.

# Node.js
# Build a general Node.js project with npm.
# Add steps that analyze code, save build artifacts, deploy, and more:
# https://docs.microsoft.com/azure/devops/pipelines/languages/javascript

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bump @apawast

@apawast apawast mentioned this pull request Mar 6, 2019
4 tasks
@JoshuaKGoldberg
Copy link

Super, thanks for making progress on this! Closing this PR in favor of #838.

@JoshuaKGoldberg JoshuaKGoldberg added this to the None milestone Apr 15, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Domain: Tooling Repository tasks around improving source tooling. PR: Waiting for Author Changes have been requested that the pull request author should address. Status: Awaiting More Feedback Status: In Discussion Please continue discussing the proposed change before sending a pull request.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Request: Build, Test and Release tslint-microsoft-contrib using Azure Pipelines