-
-
Notifications
You must be signed in to change notification settings - Fork 724
Staging with Github Actions
We've recently introduced the possibility to stage pull-requests with Github Actions, on our main repo 🎉
You can stage to any of our staging servers:
-
au-staging
accessible on https://staging.openfoodnetwork.org.au/ -
fr-staging
accessible on https://staging.coopcircuits.fr/ -
uk-staging
accessible on https://staging.openfoodnetwork.org.uk/
To achieve this, you'll need:
- a Github account
- read access over the openfoodnetwork repository
After logging into Github, there are two ways you can trigger a staging workflow.
- visit the URL of the target PR, like
https://github.com/openfoodfoundation/openfoodnetwork/pull/<pr_number>
- and click the wheel from the Labels section, selecting one of the
pr-staging-*
labels:
You can check if the workflow trigger was successful, by visiting the Github Actions tab, and finding the a running workflow for the PR:
As above, visit the Actions section, and:
- click
Deploy to Staging
- click on the
Run Workflow
dropdown - select a
branch
or atag
- select a staging server
- click
Run workflow
If you've selected Branch: master
, you can also add a has from a specific commit, in the Commit Reference
field.
But before you stage, follow the checklist to prevent conflicts:
- Check that nobody else is using the staging server you want to use. For example for Australian staging server, make sure that no other people is using it by checking the
pr-staged-au
label pull request is staged. - Check that the pull request is approved, in the Test Ready column and has no test failures or merge conflicts.
- Let others know that you are staging it by commenting on the #testing on Slack, if you have not used the label to trigger the workflow
- If you wish to use a staging server without triggering a workflow, please use the labels
pr-no-staging-*
; these won't trigger staging workflows, but will serve to signal to others on the team that the server is being used.
- The pull request and master are merged so that the result is staged and tested.
- The merge commit is pushed to the staging server.
- The server resets the database to its baseline data.
- A deploy script is run.
- If you are testing a PT, you can put your testing notes on the PR like usual.
- Then you can stage the next PR, without needing to wait for the previous PR to be pushed. Just remember to switch the staged label over.
Development environment setup
- Pipeline development process
- Bug severity
- Feature template (epic)
- Internationalisation (i18n)
- Dependency updates
Development
- Developer Guidelines
- The process of review, test, merge and deploy
- Making a great commit
- Making a great pull request
- Code Conventions
- Database migrations
- Testing and Rspec Tips
- Automated Testing Gotchas
- Rubocop
- Angular and OFN
- Feature toggles
- Stimulus and Turbo
Testing
- Testing process
- OFN Testing Documentation (Handbooks)
- Continuous Integration
- Parallelized test suite with knapsack
- Karma
Releasing
Specific features
Data and APIs
Instance-specific configuration
External services
Design