dpc-sdp / ripple

Ripple is the frontend framework for Single Digital Presence, delivered using Nuxt and Vue.js
Apache License 2.0
61 stars 37 forks source link

[DEVOPS-248] Migrate CircleCI to Github actions #1313

Closed MarkCalvert closed 9 months ago

MarkCalvert commented 10 months ago

Motivation and Context

JIRA issue: https://salsadigital.atlassian.net/browse/DEVOPS-248

Changed

  1. Created new Github action workflows based off current CircleCI implementation

Screenshots

Screenshot 2023-08-15 at 11 00 39 AM

How Has This Been Tested?

Checklist

tim-yao commented 10 months ago

@MarkCalvert @FleetAdmiralButter The ci trigger is not working:

 Triggering end to end testing for ripple...
Error: No E2E GitHub token found, end to end is not triggered. Please make sure E2E_GITHUB_TOKEN is set up.

Do we need to wait for the middleware to work first then we can test it?

MarkCalvert commented 10 months ago

@tim-yao, a few things are required to test the CI nightwatch trigger. First, a GitHub access token must be added to the lagoon project for E2E_GITHUB_TOKEN. This token and API call will get replaced with the middleware work. Secondly, unfortunately and annoyingly workflow dispatches can not be tested until they are merged into the default branch which is not ideal. https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#workflow_dispatch I will see if there is a workaround.

tim-yao commented 10 months ago

@MarkCalvert ok. Can you please use your own GitHub token to call the same curl request from your local? Then we can see if it works.

MarkCalvert commented 9 months ago

Hi @tim-yao, Using the GitHub CLI tool, I found a workaround to trigger the nightwatch workflow for testing. Here is the gh CLI command you can run from the locally cloned repo. gh workflow run nightwatch.yml --ref feature/migrating-circleci-to-github-actions -f e2e=true -f e2e_project=reference -f e2e_be_url=https://develop.content.reference.sdp.vic.gov.au -f e2e_fe_url=https://app.pr-1313.ripple.sdp4.sdp.vic.gov.au/

You can view the actions I have triggered for the nightwatch workflow and will notice they fail in the e2e reusable workflow tests, can you please review these?

MarkCalvert commented 9 months ago

@tim-yao I have disabled the workflows by updating the on event branches to a name that does not exist, so they will not be triggered on master and uat pushes. https://github.com/dpc-sdp/ripple/pull/1313/commits/06c07d932d6e3c86a8dfc10dee4bfe4fff461f5d