Skip to content

Add GitHub Actions for e2e tests #7

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

Open
wants to merge 27 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
3fdf18f
Add GitHub Actions for e2e tests
mraible Mar 20, 2025
aeaa8d8
Add step to install Homebrew
mraible Mar 20, 2025
c68cd3a
Create directory before adding file to it
mraible Mar 20, 2025
9c6c821
Add debug logging
mraible Mar 20, 2025
75c3259
Use "rm -f" to suppress error if file doesn't exist
mraible Mar 20, 2025
ca4758c
Remove ids from manifest with yq
mraible Mar 20, 2025
f7126f1
Add delete app step
mraible Mar 20, 2025
2ee08b6
Force delete so prompt is suppressed
mraible Mar 20, 2025
7155a52
Add path to checkout to workaround delete removing current directory
mraible Mar 20, 2025
6664ff2
Add release step
mraible Mar 24, 2025
9d85c87
Fix variable name in deploy step
mraible Mar 24, 2025
256b2c0
Print output for debugging
mraible Mar 24, 2025
5cd76ac
Fix syntax for setting DEPLOYMENT_ID
mraible Mar 24, 2025
7d6370f
Update syntax for setting DEPLOYMENT_ID
mraible Mar 24, 2025
2ab4253
Fix reading DEPLOYMENT_ID
mraible Mar 24, 2025
603b4f4
Sleep 5 seconds before attempting to release
mraible Mar 24, 2025
e11a32b
Maybe grabbing the distribution ID is not necessary?
mraible Mar 24, 2025
18e8c42
Add step to rename app so it's unique
mraible Mar 25, 2025
40f438e
Fix updating name syntax
mraible Mar 25, 2025
80b459f
Cleanup workflow based on Carlos' feedback
mraible Mar 25, 2025
e56eadd
Fix env variable name
mraible Mar 25, 2025
e051bfa
Add until block instead of sleep before deploying
mraible Mar 25, 2025
3320fc5
Fix loop syntax
mraible Mar 25, 2025
d4f5584
Merge branch 'main' into github-actions
mraible Apr 21, 2025
52d0522
Stayin' Alive!
mraible Jun 27, 2025
2964c50
Merge branch 'main' into github-actions
mraible Jun 27, 2025
e8be1ab
Use config file for settings
mraible Jun 27, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
71 changes: 71 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
name: Quickstart CI

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
deploy-and-release:
runs-on: ubuntu-latest
env:
FOUNDRY_CONFIG_DIR: ~/.config/foundry

steps:
- uses: actions/checkout@v4

- name: Set up Homebrew
uses: Homebrew/actions/setup-homebrew@master

- name: Install required tools
run: |
brew tap crowdstrike/foundry-cli
brew install crowdstrike/foundry-cli/foundry yq

- name: Create profile for Foundry CLI
env:
CID: ${{ secrets.FOUNDRY_CID }}
CLIENT_ID: ${{ secrets.FOUNDRY_API_CLIENT_ID }}
CLIENT_SECRET: ${{ secrets.FOUNDRY_API_CLIENT_SECRET }}
CLOUD_REGION: ${{ secrets.FOUNDRY_CLOUD_REGION }}
run: |
mkdir -p ${{ env.FOUNDRY_CONFIG_DIR }}
cat > ${{ env.FOUNDRY_CONFIG_DIR }}/configuration.yml << EOF
profiles:
- name: E2E CID
cloud_region: ${CLOUD_REGION}
credentials:
cid: ${CID}
api_client_id: ${CLIENT_ID}
api_client_secret: ${CLIENT_SECRET}
active_profile: E2E CID
logging.debug: false
EOF

- name: Prepare app manifests
run: |
# Remove IDs from manifest
yq -i 'del(.. | select(has("id")).id) | del(.. | select(has("app_id")).app_id)' manifest.yml

# Generate unique app name
yq -i '.name = .name + "-${{ github.actor }}-" + "'$(date +"%Y%m%d%H%M")'"' manifest.yml

echo "Prepared manifest with app name: $(yq '.name' manifest.yml)"

- name: Deploy app to Falcon
run: foundry apps deploy --change-type=major --change-log="e2e deploy"

- name: Release app to Falcon
run: |
until foundry apps list-deployments | grep -i "successful"; do
sleep 1
done
echo "Releasing app..."
foundry apps release --change-type=major --notes="e2e release"

- name: Delete app from Falcon
if: always()
run: |
foundry apps delete -f
echo "App deleted successfully"