diff --git a/.github/workflows/go_test.yaml b/.github/workflows/go_test.yaml index aa7b8d1..5d694f2 100644 --- a/.github/workflows/go_test.yaml +++ b/.github/workflows/go_test.yaml @@ -5,7 +5,7 @@ on: push: jobs: - test-jinx: + unit-test: runs-on: ubuntu-22.04 steps: - name: "checkout" @@ -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 diff --git a/bin/cicd_integration.sh b/bin/cicd_integration.sh new file mode 100755 index 0000000..4322445 --- /dev/null +++ b/bin/cicd_integration.sh @@ -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"