forked from Galactica-corp/galactica
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from boogeroccam/feat/python-tests
Feat/python tests
- Loading branch information
Showing
98 changed files
with
19,083 additions
and
142 deletions.
There are no files selected for viewing
This file contains 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,80 @@ | ||
name: CI/CD Pipeline | ||
|
||
on: | ||
push: | ||
branches: | ||
- "*" | ||
pull_request: | ||
types: [opened, synchronize] | ||
workflow_dispatch: | ||
inputs: | ||
branch: | ||
description: "Branch to run tests on" | ||
required: true | ||
default: "main" | ||
release: | ||
types: [created] | ||
|
||
jobs: | ||
build: | ||
runs-on: self-hosted | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set GO_VERSION | ||
run: echo "GO_VERSION=$(cat go.mod | grep '^go ' | cut -f2 -d' ')" >> $GITHUB_ENV | ||
|
||
- name: Set up Go | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version: ${{ env.GO_VERSION }} | ||
|
||
- name: Build binary | ||
run: make build | ||
|
||
- name: Upload binary artifact | ||
# if: github.event_name == 'release' | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: galacticad | ||
path: build/galacticad | ||
|
||
test: | ||
runs-on: self-hosted | ||
needs: | ||
- build | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Download binary artifact | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: galacticad | ||
path: build | ||
|
||
- uses: astral-sh/setup-uv@v3 | ||
with: | ||
version: "latest" | ||
|
||
- name: Run tests | ||
run: | | ||
make test | ||
if [ -f "tests/galacli/report.md" ]; then | ||
echo "<details><summary>Test Report</summary>" >> $GITHUB_STEP_SUMMARY | ||
echo "" >> $GITHUB_STEP_SUMMARY | ||
cat tests/galacli/report.md >> $GITHUB_STEP_SUMMARY | ||
echo "" >> $GITHUB_STEP_SUMMARY | ||
echo "</details>" >> $GITHUB_STEP_SUMMARY | ||
fi | ||
- name: Render the report to the PR when tests fail | ||
uses: marocchino/sticky-pull-request-comment@v2 | ||
with: | ||
header: test-report | ||
recreate: true | ||
path: tests/galacli/report.md | ||
|
||
permissions: | ||
pull-requests: write |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.