From dde4c06e61c39d067fffe71e3e073d05cedaf7e0 Mon Sep 17 00:00:00 2001 From: Charlie Conneely Date: Fri, 26 Jul 2024 12:44:57 +0100 Subject: [PATCH] Adding unit tests workflow --- .github/workflows/unit-tests.yml | 35 ++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .github/workflows/unit-tests.yml diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml new file mode 100644 index 000000000..568bd3882 --- /dev/null +++ b/.github/workflows/unit-tests.yml @@ -0,0 +1,35 @@ +name: Unit Tests +on: + push: + paths-ignore: + - 'README.md' +jobs: + # ensure the code builds... + build: + name: Unit Tests + runs-on: ubuntu-latest + timeout-minutes: 5 + steps: + - name: Set up Go + uses: actions/setup-go@v5 + with: + go-version: '1.20' + id: go + - name: Check out code into the Go module directory + uses: actions/checkout@v4 + - name: Run Unit Tests + env: + TF_UNIT: * + TF_LOG: 'DEBUG' + TF_LOG_PATH: ${{ github.workspace }}/test.log + + run: | + go test ./genesyscloud/... -v -run TestUnit + + - name: 'Upload Logs' + if: ${{ always() }} + uses: actions/upload-artifact@v4 + with: + name: unit test logs + path: ${{ github.workspace }}/test.log + retention-days: 5 \ No newline at end of file