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

Already on GitHub? Sign in to your account

fix: refactor the src code & add initial ci tests #7

Merged
merged 18 commits into from
May 18, 2023
Merged

Conversation

jaylenw
Copy link
Member

@jaylenw jaylenw commented May 16, 2023

What does this PR do?

The PR makes substantial changes to the src code to resolve the deprecation notices mentioned here https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/ and here https://github.blog/changelog/2022-09-22-github-actions-all-actions-will-begin-running-on-node16-instead-of-node12/.

I expect no API breaking changes. I added testing with Jest and Nock, as well as modified the example GitHub Action Workflows to make sure everything was up to date and all was well. A new GitHub Action workflow has been added to provide coverage reports in PRs.

Documentation has been updated appropriately.

Background info

Resources referenced:

The node_modules folder has to be committed as documented by GitHub. I have ran npm audit fix to resolve any security vulnerabilities npm found.

You may view the successful workflow runs here https://github.com/CityOfLosAngeles/fetch-latest-github-release/actions/runs/4994739002.

How can this be tested (manually and/or automated test)?

Provide Manual tests Steps if applicable

N/A

Provide steps for running automated tests if applicable

  1. Checkout this branch
  2. Run npm test

Code coverage report is provided in coverage/.

Which issue(s) is/are related to this PR?

This PR is/are related to issue(s) #6

close #6

@jaylenw jaylenw added the enhancement New feature or request label May 16, 2023
@jaylenw jaylenw self-assigned this May 16, 2023
@github-actions
Copy link

Code coverage

Filename Statements Branches Functions Lines
action.js 77.55% 63.64% 66.67% 77.55%
config/default.js 100% 100% 100% 100%

@jaylenw jaylenw changed the title fix: refactor the src code & add initialize ci tests fix: refactor the src code & add initial ci tests May 16, 2023
@jaylenw jaylenw marked this pull request as ready for review May 16, 2023 17:35
@jaylenw jaylenw requested a review from a team as a code owner May 16, 2023 17:35
@RV-LACity
Copy link
Contributor

@jaylenw
Copy link
Member Author

jaylenw commented May 18, 2023

@jaylenw , noting that there is a deprecation warning in https://github.com/CityOfLosAngeles/fetch-latest-github-release/actions/runs/4994953857. Related to use of actions/setup-node@v2, mattallty/jest-github-action@v1 in https://github.com/CityOfLosAngeles/fetch-latest-github-release/blob/ghi-6/.github/workflows/test-coverage.yml

Ah yes, I forgot to mention this. I will create an issue for us to explore https://github.com/ArtiomTr/jest-coverage-report-action as it has recent activity suggesting it is maintained. The action I added looks like it is no longer being supported based off of the lack of recent activity. I will create an issue for this and merge this PR for now. Thanks!

@jaylenw
Copy link
Member Author

jaylenw commented May 18, 2023

Noting @RV-LACity Issue created, #8.

@jaylenw jaylenw merged commit 398fb8c into development May 18, 2023
@ita-devops-release-manager ita-devops-release-manager bot added the staged PRs that have been merged into the development branch containing changes yet to be pushed to prod label May 18, 2023
@jaylenw jaylenw added released PRs that have had their changes released to production and removed staged PRs that have been merged into the development branch containing changes yet to be pushed to prod labels May 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request released PRs that have had their changes released to production
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add initial unit / CI tests
2 participants