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

ci: End to end testing #153

Merged
merged 4 commits into from
Apr 28, 2023
Merged

ci: End to end testing #153

merged 4 commits into from
Apr 28, 2023

Conversation

armenzg
Copy link
Member

@armenzg armenzg commented Apr 27, 2023

For PRs, the CI will create releases under the action-release-prs project while master will create them for the action-release project.

We use different projects since the Release feature does not handle different environments as a way to separate commits. Alternatively, we could have postfixed a different string per PR and use the same project.

This PR also enable us to test real action-release execution (read: end to end testing).

For PRs, the CI will create releases under the action-release-prs project while master will create them for the action-release project.

We use different projects since the Release feature does not handle different environments as a way to separate commits. Alternatively, we could have postfixed a different string per PR and use the same project.
@armenzg armenzg self-assigned this Apr 27, 2023
# instead of action-release-prs
# For other branches: https://sentry-ecosystem.sentry.io/releases/?project=4505075304693760
# For master branch: https://sentry-ecosystem.sentry.io/releases/?project=6576594
SENTRY_PROJECT: ${{ vars.SENTRY_PROJECT }}
Copy link
Member Author

Choose a reason for hiding this comment

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

You can see in the following screenshot how I pick the right project name based on the branch used:
image

@@ -11,6 +19,8 @@ jobs:
steps:
- name: Checkout repo
uses: actions/checkout@v3
with:
fetch-depth: 0
Copy link
Member Author

Choose a reason for hiding this comment

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

This is explained in the troubleshoot section.

ref: ${{ github.event.pull_request.head.sha || github.sha }}

# This allows executing the action's code in the next step rather than a specific tag
- uses: './.github/actions/use-local-dockerfile'
Copy link
Member Author

Choose a reason for hiding this comment

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

This is basically an sed command to tell the action to use the Dockerfile found in the checkout.

diff --git a/action.yml b/action.yml
index 89bbe57..4095cbe 100644
--- a/action.yml
+++ b/action.yml
@@ -47,7 +47,7 @@ inputs:
 runs:
   using: 'docker'
   # If you change this, update the use-local-dockerfile action
-  image: 'docker://ghcr.io/getsentry/action-release-image:latest'
+  image: 'Dockerfile'
 branding:
   icon: 'triangle'
   color: 'purple'

@armenzg armenzg marked this pull request as ready for review April 27, 2023 14:22
@armenzg armenzg requested a review from a team April 27, 2023 14:22
@armenzg armenzg enabled auto-merge (squash) April 27, 2023 14:22
@armenzg armenzg requested a review from asottile-sentry April 27, 2023 14:23
@armenzg armenzg changed the title ci: Create releases as part of the workflows ci: End to end testing Apr 27, 2023
@armenzg
Copy link
Member Author

armenzg commented Apr 27, 2023

CC: @loewenheim @kamilogorek

Copy link
Contributor

@kamilogorek kamilogorek left a comment

Choose a reason for hiding this comment

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

I don't know much about this GH action tbh, but overall changes look good.

Co-authored-by: Kamil Ogórek <kamil.ogorek@gmail.com>
@armenzg armenzg merged commit 3bdd61f into master Apr 28, 2023
@armenzg armenzg deleted the ci_changes branch April 28, 2023 17:49
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.

3 participants