[WIP] Allowing Testing on External Forks #1559
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hello, (Update Feb 2, 2025)
So I have been testing running tests on external forks, and I think I got it working safely with this example
adwise-fiu/Level-Site-PPDT#14
So for set up, I did the following
![image](https://private-user-images.githubusercontent.com/13652675/408901010-7eb0b791-db8b-44d6-aa88-6dcc851c7795.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzg5MzEzODEsIm5iZiI6MTczODkzMTA4MSwicGF0aCI6Ii8xMzY1MjY3NS80MDg5MDEwMTAtN2ViMGI3OTEtZGI4Yi00NGQ2LWFhODgtNmRjYzg1MWM3Nzk1LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMDclMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjA3VDEyMjQ0MVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTliMWUyYjY3MDQxZjY1ZmYxODRiZDc3MDdiNjZjZTU3NDJiYzY1ODczYWU0NzA4ZGZlODYzNzEzNWRhMzc3Y2QmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.90mVpq5OPW8eQxTmQoAQQnE9-5q84U2P66DS7PRZhQ0)
1- Setup branch protection rule
2- Update Action to allow external forks
![image](https://private-user-images.githubusercontent.com/13652675/408901032-48789f05-0667-49a2-b81b-183b5950fab1.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzg5MzEzODEsIm5iZiI6MTczODkzMTA4MSwicGF0aCI6Ii8xMzY1MjY3NS80MDg5MDEwMzItNDg3ODlmMDUtMDY2Ny00OWEyLWI4MWItMTgzYjU5NTBmYWIxLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMDclMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjA3VDEyMjQ0MVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWYzNWJiMWY4MzU4YjUxNjVlOGJkMTdmNjM0MTQ5ODE3ZDFkY2U2MmRhMmM5MGUzNTkyMjBiYzkzY2NjNzZjMWYmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.sDN5eCE4NkbI4NSTEG-WBZo3QjrsgUlZ-Z9JKApFuoc)
3- See the updated workflow, so essentially what happens is,
![image](https://private-user-images.githubusercontent.com/13652675/408901226-83104d9f-1545-4fc9-85e7-04c4e9327c58.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzg5MzEzODEsIm5iZiI6MTczODkzMTA4MSwicGF0aCI6Ii8xMzY1MjY3NS80MDg5MDEyMjYtODMxMDRkOWYtMTU0NS00ZmM5LTg1ZTctMDRjNGU5MzI3YzU4LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMDclMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjA3VDEyMjQ0MVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTgwOTc0MGM5ODM5MzNjNjlkMjVlN2U4YmQxZDc1MGZjNWRiZjk3MTAxNDFjNjYyMjgwM2I2MTU4ZjU3M2Y0YTgmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.UW60-Djzs04niKDNBLR7HyrixojWtw4YmbPNLPd9yQc)
a) Someone creates a Pull Request
b) Before the option appears to even run the test cases, I need the changes approved, once I see that checkmark, then the option to run test cases appears, and I click OK and run the tests.
The security comes from needing a manual approval. The GitHub Actions will prevent ANY code being run until Step A is completed.
There is one slight issue, the reviewer can't be the same person writing the PR, which is technically more secure, but does slightly make things a bit more annoying?