Skip to content

Commit

Permalink
CI: Replace test execution handler with conditional (#232)
Browse files Browse the repository at this point in the history
* Add unit test coverage and add workflow to upload test data

* e2e framework, update makefile, tod upload logic changed to using git submodule repo

* oops forgot LINODE_TOKEN

* add submodule in workflow file

* misplaced submodule

* lint

* rename GNUmakefile to Makefile

* Add teardown

* defer teardown method

* place defer block

* made image label as global variable for duplicating tests

* go fmt and update variable names

* replace test execution handler with conditional

* update tod_scripts to latest

---------

Co-authored-by: Zhiwei Liang <121905282+zliang-akamai@users.noreply.github.com>
  • Loading branch information
ykim-akamai and zliang-akamai authored May 8, 2024
1 parent 45e3bb4 commit f271cfa
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 13 deletions.
14 changes: 2 additions & 12 deletions .github/workflows/integration-unit-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,27 +34,17 @@ jobs:
- name: Run integration and unit tests
run: |
echo "Testing with Go ${{ needs.get-go-version.outputs.go-version }}"
if ! make test | go-junit-report -set-exit-code > "$REPORT_FILENAME"; then
echo "EXIT_STATUS=1" >> $GITHUB_ENV
fi
cat "$REPORT_FILENAME"
make test | go-junit-report -set-exit-code -iocopy -out > "$REPORT_FILENAME"
env:
LINODE_TOKEN: ${{ secrets.LINODE_TOKEN }}

- name: Upload test report as artifact
if: always()
uses: actions/upload-artifact@v4
with:
name: test-report-file
path: "${{ env.REPORT_FILENAME }}"

- name: Test Execution Status Handler
run: |
if [[ "$EXIT_STATUS" != 0 ]]; then
echo "Test execution contains failure(s), check Run Integration tests step above"
exit $EXIT_STATUS
else
echo "Tests passed!"
fi

process-upload-report:
runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion tod_scripts

0 comments on commit f271cfa

Please sign in to comment.