Conversation
cd9ffc9 to
0a9c1cc
Compare
|
@willsmythe @apawast Can you take a look at this? Also, I'm not really sure why the prettier step is failing...any ideas? Maybe it fails on PR builds but not CI? We're also not that much faster than AppVeyor. |
0a9c1cc to
352f4cf
Compare
|
@kaylangan - I think the problem is that Azure Pipelines doesn't clone "master" and then checkout the commit being built like AppVeyor and CircleCI apparently do (which is why "master" is unknown). For reference, see the clone call in the AppVeyor log. Without changing the existing logic, you should be able to do a Also, I would double check that their "get the list of changed files" logic works correctly for both CI and PR builds. For PR builds, HEAD will be a merge commit (merging of the source branch into the target branch) ... I'm not sure if this will cause problems for git merge-base or diff. |
|
@willsmythe I had at first suspected that we don't fetch My suspicion was actually your second guess--that it's having trouble finding the merge-base of the merge commit and Either way, both are easy hypotheses to verify. I'll report back! |
|
I’m definitely no Git expert … so you may be right. If you run “git branch -l”, you should get the list of local branches in the repo … which should validate (or invalidate) my suggestion 😊
|
c282a13 to
747723f
Compare
|
@willsmythe What do you think of this structure for the jobs? Names of jobs/files still TBD, but I wanted to get feedback on the setup before getting in too deep. |
|
@kaylangan - I like it. It's really clear when looking at the .azure-pipelines.yml what jobs will be run. I also like the way steps are reused. Other random things ...
|
I like that. I'll update.
Yeah, I went back and forth on this one. Are you thinking we put all the YAML files into the folder |
My gut reaction is that we have a root-level |
|
@willsmythe I'm going to put this aside for now. Some notes:
|
37efa33 to
99c8949
Compare
|
@apawast Here's the react one. I kicked off a new build after refactoring some things--I'm expecting coveralls to fail--you can look at prior builds for details since it might take a bit before it hits the coveralls step. |
95427b5 to
7cb86e4
Compare
|
|
||
| steps: | ||
| # master is not fetched by default and is needed to run prettier | ||
| - script: git fetch origin master:master |
There was a problem hiding this comment.
If you only need to fetch master for prettier, can you move this step next to / with the prettier step? For one, it would avoid a step showing up in every single job, especially if not all need it. It would also downplay this step, like if you moved it within your "script" step that invokes prettier.
There was a problem hiding this comment.
see comment about adding prettier-ci to the package.json.
| - script: set JEST_JUNIT_OUTPUT=.azure-pipelines/test-results/test-basic-windows.xml&&yarn test | ||
| displayName: 'Run tests' | ||
|
|
||
| - script: yarn prettier |
There was a problem hiding this comment.
Any idea why prettier is invoked differently in Windows vs. Linux? In Linux, the step has this:
node ./scripts/prettier/index
There was a problem hiding this comment.
I don't think it's intentional; more a side effect of having developed the AppVeyor and Circle processes separately. yarn prettier runs node ./scripts/prettier/index write-changed which is probably only appropriate locally. So I would suggest either changing the line you highlighted to node ./scripts/prettier/index or adding another script to the package. I'm leaning adding prettier-ci to the package.json...what do you think?
There was a problem hiding this comment.
If anything...if we add prettier-ci to the package, we can add the git fetch origin master:master to that script.
1f46f26 to
1ebf5ab
Compare
| yarn test --maxWorkers=2 | ||
| displayName: 'Run tests' | ||
|
|
||
| - script: ./scripts/circleci/check_license.sh |
There was a problem hiding this comment.
They may balk at this (and suggest this gets done in a separate PR), but what about renaming scripts/circleci to scripts/ci? One more thing in a theme of generalizing and becoming less tied to any one CI service.
There was a problem hiding this comment.
Yeah, I was going to suggest it in the PR description but leave it out for now.
999c40b to
a543745
Compare
a543745 to
0e7f449
Compare
Generated by 🚫 dangerJS |
0e7f449 to
69c0db3
Compare
| # | ||
|
|
||
| steps: | ||
| - script: | |
There was a problem hiding this comment.
Since this step is only needed on Windows, you might move it to the WindowsTests job or into a Windows-specific step template that gets referenced from the WindowsTests job.
(on Linux and macOS jobs, it's just unnecessary noise in the results/log)
| - script: node ./scripts/tasks/flow-ci | ||
| displayName: 'Flow CI' | ||
|
|
||
| - script: | |
There was a problem hiding this comment.
I'd switch this to bash since it uses bash-specific keywords (which would fail if this step template is ever used on Windows). Of course, someone could always fix this later, but I've generally tried to use "bash" instead of just "script" when the script absolutely requires bash.
| - script: yarn build | ||
| displayName: 'Build' | ||
|
|
||
| - script: set JEST_JUNIT_OUTPUT=.azure-pipelines/test-results/test-basic-windows.xml&&yarn test |
There was a problem hiding this comment.
I've been setting the env property of script when i need a variable to exist only for one step:
script: yarn test
env:
JEST_JUNIT_OUTPUT: '.azure-pipelines/test-results/test-basic-windows.xml'
Uh oh!
There was an error while loading. Please reload this page.