name: test-run-go-tests-for-path on: workflow_call: inputs: name: description: 'The name to use that will appear in the output log file artifact' required: true type: string path: description: 'The path to the test without the precedeing "./" or following "/..." e.g. go test -v ./$path/...' required: true type: string # We will need to add the capacity for receiving passed secrets once we get to the tests that require API credentials env: VAULT_ACC: 1 jobs: go-test: runs-on: ubuntu-latest steps: - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c - name: Set Up Go uses: actions/setup-go@d0a58c1c4d2b25278816e339b944508c875f3613 with: go-version-file: ./.go-version - run: go test -v ./${{ inputs.path }}/... 2>&1 | tee ${{ inputs.name }}.txt - uses: actions/upload-artifact@b7f8abb1508181956e8e162db84b466c27e18ce with: name: ${{ inputs.name }}-output path: ${{ inputs.name }}.txt retention-days: 2