Skip to content

Commit

Permalink
Adds automated integration testing.
Browse files Browse the repository at this point in the history
  • Loading branch information
gwynforthewyn committed Aug 5, 2023
1 parent 9bb868b commit dab25ae
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 1 deletion.
15 changes: 14 additions & 1 deletion .github/workflows/go_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
push:

jobs:
test-jinx:
unit-test:
runs-on: ubuntu-22.04
steps:
- name: "checkout"
Expand All @@ -15,3 +15,16 @@ jobs:
- name: "run tests"
run: |
go test -v ./...
integration-test:
runs-on: ubuntu-22.04
steps:
- name: "checkout"
uses: actions/checkout@v3
with:
ref: ${{ env.GITHUB_REF }}
- name: "install"
run: |
go install .
- name: "run integration tests"
run: |
./bin/cicd_integration.sh
20 changes: 20 additions & 0 deletions bin/cicd_integration.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/bin/bash -elx

THIS_SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
cd "${THIS_SCRIPT_DIR}/.."

templ repo https://github.com/playtechnique/templ_templates

echo "Catting the fetch charts script..."
templ cat fetch

cat > release-from-tag-config.yaml << EOF
---
Output-Binary: "roflcopter"
EOF

echo "Rendering release-from-tag.yaml"
OUTPUT=$(templ render templ_templates/github_workflows/go/release-from-tag.yaml=release-from-tag-config.yaml)

echo "Validating render..."
echo "${OUTPUT}" | grep "roflcopter"

0 comments on commit dab25ae

Please sign in to comment.