chore(docs): Update README examples. #2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Go Test Workflow | |
on: | |
push: | |
workflow_dispatch: | |
jobs: | |
test: | |
name: Run tests | |
runs-on: kf-go-client-sdk-runner-set | |
strategy: | |
matrix: | |
environment: [ "KFC_10_5_0", "KFC_12_3_0_KC"] | |
environment: ${{ matrix.environment }} | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v3 | |
- name: Set up Go | |
uses: actions/setup-go@v3 | |
with: | |
go-version: 1.22 | |
- name: Get Public IP | |
run: curl -s https://api.ipify.org | |
- name: Run tests | |
run: | | |
if [ -n "${{ secrets.KEYFACTOR_AUTH_CONFIG_B64 }}" ]; then | |
mkdir -p ~/.keyfactor | |
echo "${{ secrets.KEYFACTOR_AUTH_CONFIG_B64 }}" | base64 --decode > ~/.keyfactor/command_config.json | |
fi | |
go test -v -cover ./auth_providers/... | |
env: | |
KEYFACTOR_PASSWORD: ${{ secrets.KEYFACTOR_PASSWORD }} | |
KEYFACTOR_USERNAME: ${{ secrets.KEYFACTOR_USERNAME }} | |
KEYFACTOR_AUTH_CONFIG_B64: ${{ secrets.KEYFACTOR_AUTH_CONFIG_B64 }} | |
KEYFACTOR_AUTH_CLIENT_ID: ${{ secrets.KEYFACTOR_AUTH_CLIENT_ID }} | |
KEYFACTOR_AUTH_CLIENT_SECRET: ${{ secrets.KEYFACTOR_AUTH_CLIENT_SECRET }} | |
KEYFACTOR_AUTH_TOKEN_URL: ${{ vars.KEYFACTOR_AUTH_TOKEN_URL }} | |
KEYFACTOR_HOSTNAME: ${{ vars.KEYFACTOR_HOSTNAME }} | |
KEYFACTOR_AUTH_HOSTNAME: ${{ vars.KEYFACTOR_AUTH_HOSTNAME }} | |
KEYFACTOR_SKIP_VERIFY: ${{ vars.KEYFACTOR_SKIP_VERIFY }} | |
TEST_KEYFACTOR_AD_AUTH: ${{ vars.TEST_KEYFACTOR_AD_AUTH }} | |
TEST_KEYFACTOR_KC_AUTH: ${{ vars.TEST_KEYFACTOR_KC_AUTH }} |