Skip to content

BOM-2988: Replace Travis with GitHub CI #245

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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Nov 20, 2021

Conversation

UsamaSadiq
Copy link
Member

Issue: BOM-2988

Description

  • Replace Travis with GitHub CI.

@UsamaSadiq UsamaSadiq requested a review from a team November 10, 2021 11:09
@UsamaSadiq UsamaSadiq force-pushed the usamasadiq/bom-2988-replace-travis-with-github-ci branch from 8528e84 to d440b8d Compare November 10, 2021 11:11
@nedbat
Copy link
Contributor

nedbat commented Nov 10, 2021

This changes the release trigger from commits to tags. @davidjoy is that in line with fedx practice?

@davidjoy
Copy link
Contributor

@nedbat I'm not sure I follow the commits/tags comment... My understanding is that semantic-release is responsible for creating a tag for the release based on the conventional commit messages in the commits, which is what we do in all our frontend libraries. Does this change that process?

Copy link
Contributor

@davidjoy davidjoy left a comment

Choose a reason for hiding this comment

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

Think I'm seeing some issues here w/r/t npm -> npx and a storybook action.

I''l note that in frontend-build we already have a Github release workflow. I'd suggest we keep this one consistent with that: https://github.com/edx/frontend-build/blob/master/.github/workflows/release.yml

@nedbat
Copy link
Contributor

nedbat commented Nov 10, 2021

@davidjoy the .travis.yml file had this:

after_success:
- npx semantic-release@17
- codecov

so semantic-release was run after every test run. The new action has:

name: Release CI
on:
  push:
    tags:
      - '*'

so the Release CI action is only run when a new tag is pushed, and it's the Release CI that runs semantic-release.

@davidjoy
Copy link
Contributor

Oh, thank you, I didn't catch that. That sounds like a sane change; I don't know why we'd have semantic-release run anytime except when merging into master.

@nedbat
Copy link
Contributor

nedbat commented Nov 10, 2021

I don't know why we'd have semantic-release run anytime except when merging into master.

OK, except this is less frequently than that: only when someone explicitly makes and pushes a tag.

@davidjoy
Copy link
Contributor

Okay, now I'm confused again... semantic-release is responsible for creating the tags and does that as part of its work, after it figures out the version bump based on the commits being merged in to master. We definitely don't want that to become a manual process, and I'm pretty sure semantic-release will fail if the tag already exists.

@UsamaSadiq UsamaSadiq force-pushed the usamasadiq/bom-2988-replace-travis-with-github-ci branch from d440b8d to c2c6970 Compare November 11, 2021 09:41
@codecov-commenter
Copy link

Codecov Report

Merging #245 (c2c6970) into master (d1823fa) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #245   +/-   ##
=======================================
  Coverage   80.79%   80.79%           
=======================================
  Files          38       38           
  Lines         885      885           
  Branches      163      163           
=======================================
  Hits          715      715           
  Misses        159      159           
  Partials       11       11           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d1823fa...c2c6970. Read the comment docs.

@UsamaSadiq
Copy link
Member Author

@davidjoy I've updated the Release CI to only trigger incase of master branch as it was being done in Travis before. Is this the desired case we want?

@UsamaSadiq UsamaSadiq requested a review from davidjoy November 11, 2021 09:44
Copy link
Contributor

@davidjoy davidjoy left a comment

Choose a reason for hiding this comment

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

Think we're missing the Github Pages deploy. Otherwise the release trigger sounds right.

uses: JamesIves/github-pages-deploy-action@4.1.5
with:
branch: gh-pages # The branch the action should deploy to.
folder: dist # The folder the action should deploy.
Copy link
Member Author

Choose a reason for hiding this comment

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

@davidjoy I'm not sure about the folder argument. Is the default dict value okay?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, I think that should be correct (dist, not dict, of course, but the code is right!)

@UsamaSadiq UsamaSadiq requested a review from davidjoy November 16, 2021 11:15
Copy link
Contributor

@davidjoy davidjoy left a comment

Choose a reason for hiding this comment

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

Lets get this in there and see if it works!

@UsamaSadiq UsamaSadiq merged commit 8c91c46 into master Nov 20, 2021
@UsamaSadiq UsamaSadiq deleted the usamasadiq/bom-2988-replace-travis-with-github-ci branch November 20, 2021 04:42
@binodpant binodpant mentioned this pull request Nov 23, 2021
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants