Repository navigation
ci: test ardent branch workflow #5
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
VikramChennai
wants to merge
16
commits into
main
Choose a base branch
from
docs/ci-token-login
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
d894d50
ci: add ardent branch workflow to validate CI flow on PRs
VikramChennai a905fb4
ci: add project and connector switch after login
VikramChennai d4b4afe
ci: install psql and run real query against branch
VikramChennai eda64cf
docs(ci-cd): full validated GitHub Actions workflow with setup instru…
VikramChennai db53aa1
ci: real migration tests with vitest + pg against Ardent branch
VikramChennai ee04512
ci: fix tests — unique table name, proper timeouts, no conflicts with…
VikramChennai 32f135e
docs(ci-cd): add npm ci step to match validated workflow
VikramChennai cfb689d
docs(ci-cd): full walkthrough with prereqs, steps, explanations, and …
VikramChennai a17b0b8
docs(ci-cd): deterministic CI, dashboard-only token, connector = Post…
VikramChennai 9a9d4f1
docs(ci-cd): direct link to API keys page
VikramChennai 4a92923
ci: harden ardent branch workflow cleanup
evanvolgas aa7c62c
Merge remote-tracking branch 'origin/main' into pr-5
evanvolgas 3d0314e
ci: restore ardent token login
evanvolgas 5e96a09
ci: harden ardent branch validation
evanvolgas cb92fcb
ci: pin ardent cli install
evanvolgas 0e1eaf7
test: fix migration lifecycle syntax
evanvolgas File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,59 @@ | ||
| name: Test with Ardent branch | ||
|
|
||
| on: | ||
| pull_request: | ||
| types: [opened, synchronize, reopened] | ||
|
|
||
| jobs: | ||
| test: | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 15 | ||
| env: | ||
| ARDENT_BRANCH: pr-${{ github.event.pull_request.number }}-${{ github.run_id }} | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: "22" | ||
|
|
||
| - name: Install dependencies | ||
| run: npm ci | ||
|
|
||
| - name: Install Ardent CLI | ||
| run: npm install -g ardent-cli@0.0.46 | ||
|
|
||
| - name: Log in to Ardent | ||
| env: | ||
| ARDENT_TOKEN: ${{ secrets.ARDENT_TOKEN }} | ||
| run: ardent login --token "$ARDENT_TOKEN" | ||
|
|
||
| - name: Select project and connector | ||
| env: | ||
| ARDENT_TOKEN: ${{ secrets.ARDENT_TOKEN }} | ||
| run: | | ||
| # Internal docs validation fixture; see workflows/ci-cd.mdx for the generic workflow. | ||
| ardent project switch newer-testing | ||
| ardent connector switch new-connector | ||
|
greptile-apps[bot] marked this conversation as resolved.
|
||
|
|
||
| - name: Create database branch | ||
| env: | ||
| ARDENT_TOKEN: ${{ secrets.ARDENT_TOKEN }} | ||
| run: | | ||
| DATABASE_URL="$(ardent branch create "$ARDENT_BRANCH" --print-url)" | ||
| echo "ARDENT_BRANCH_CREATED=true" >> "$GITHUB_ENV" | ||
| case "$DATABASE_URL" in | ||
| postgres://*|postgresql://*) ;; | ||
| *) echo "Ardent did not return a Postgres database URL" >&2; exit 1 ;; | ||
| esac | ||
| echo "::add-mask::$DATABASE_URL" | ||
| echo "DATABASE_URL=$DATABASE_URL" >> "$GITHUB_ENV" | ||
|
greptile-apps[bot] marked this conversation as resolved.
greptile-apps[bot] marked this conversation as resolved.
|
||
|
|
||
| - name: Run migration tests | ||
| run: npm test | ||
|
|
||
| - name: Delete database branch | ||
| if: always() && env.ARDENT_BRANCH_CREATED == 'true' | ||
| env: | ||
| ARDENT_TOKEN: ${{ secrets.ARDENT_TOKEN }} | ||
| run: ardent branch delete "$ARDENT_BRANCH" | ||
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.