Skip to content

Conversation

@samdoran
Copy link
Contributor

@samdoran samdoran commented Apr 9, 2024

  • Rename the pull_request workflow to CI
  • Run jobs on pushes to important branches not just on PRs
  • Add codecov action
  • Update test command to use jest flags
  • Improve Markdown formatting
  • Update missing links
  • Change CI status badge to GitHub actions
  • Add coverage badge
  • Update docker compose commands

samdoran added 2 commits April 9, 2024 12:43
- Rename the pull_request workflow to CI
- Run jobs on pushes to important branches not just on PRs
- Add codecov action
- Update test command to use jest flags
- Improve Markdown formatting
- Update missing links
- Change CI status badge to GitHub actions
- Add coverage badge
- Update docker compose commands
@codecov-commenter
Copy link

codecov-commenter commented Apr 9, 2024

Codecov Report

Merging #3772 (76d4575) into main (7f91ef3) will decrease coverage by 3.36%.
Report is 1448 commits behind head on main.
The diff coverage is n/a.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #3772      +/-   ##
==========================================
- Coverage   65.12%   61.77%   -3.36%     
==========================================
  Files         507      511       +4     
  Lines        9764     9918     +154     
  Branches     2090     2326     +236     
==========================================
- Hits         6359     6127     -232     
- Misses       3402     3545     +143     
- Partials        3      246     +243     

see 507 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

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

@samdoran samdoran force-pushed the ci/reenable-coverage branch from 855e7ab to 76d4575 Compare April 9, 2024 17:20
Copy link
Contributor

@dlabrecq dlabrecq left a comment

Choose a reason for hiding this comment

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

We're still relying on pull_request.xml to build PRs because the pipeline fails so often.
I was just expecting to re-add the "Upload coverage report" step at the bottom of that file.

Comment on lines +32 to +34
1. Setup `/etc/hosts` entries listed above.
1. Clone the repository, and open a terminal in the base of this project.
1. Run the command `npm install` to install all the dependencies.
Copy link
Contributor

Choose a reason for hiding this comment

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

Please fix the numbering

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is Markdown syntax for on ordered list. The correct numbers are used when the page is rendered. Makes reordering steps much less of a hassle.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm happy to go back to using hard coded numbers, though.

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 18
Copy link
Contributor

@dlabrecq dlabrecq Apr 9, 2024

Choose a reason for hiding this comment

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

Why do we need separate jobs for lint and units? Each job runs many of the same steps twice

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Separate jobs lets them run concurrently, reducing overall runtime. There are some duplicate steps, but that's because the setup needs to happen on each runner.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We could avoid the setup steps by using our own container image for CI runs. That's a much more reliable (and faster) way to run tests, but requires maintaining the CI image(s).

Comment on lines +5 to +8
branches:
- main
- prod-*
- stable-*
Copy link
Contributor

@dlabrecq dlabrecq Apr 9, 2024

Choose a reason for hiding this comment

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

Do we need this to run on push? Can we just use pull_request.xml?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Right now we don't have any CI runs on the code after it is merged into main or other branches. This would let us know the status of the code in those branches not just the PR branches.

Copy link
Contributor Author

@samdoran samdoran Apr 9, 2024

Choose a reason for hiding this comment

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

The other reason for this is integrity of the CI status badge. Without a test run against the stable branches, the CI status badge would only indicate that the last PR run was successful, not that the code in the stables branches was tested successfully.

fail-fast: false
matrix:
node-version:
- '18'
Copy link
Contributor

Choose a reason for hiding this comment

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

Don't want to hard code this version, see ${{ matrix.node-version }}

Copy link
Contributor Author

@samdoran samdoran Apr 9, 2024

Choose a reason for hiding this comment

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

This is the definition of matrix.node-version. It looks funny because it is referenced in the name field, but that's how matrix works.

@samdoran
Copy link
Contributor Author

samdoran commented Apr 9, 2024

We're still relying on pull_request.xml to build PRs because the pipeline fails so often.

Do you mean the "ci.ext.devshift.net PR build" check fails often?

I renamed pull_request.yml to ci.yml . It's doing the same checks, just optimized a bit and running against stable branches as well.

The file can be named whatever we want.

@samdoran
Copy link
Contributor Author

samdoran commented Apr 9, 2024

Speaking of ci.ext.devshift.net, that check is currently failing due to a bug (RedHatInsights/insights-frontend-builder-common#189). I'll have to change the branch name for this PR to work around it, which means this will get closed.

I can open one PR per commit in this branch so it's easier to review.

@samdoran samdoran closed this Apr 9, 2024
@samdoran samdoran deleted the ci/reenable-coverage branch April 9, 2024 20:09
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