cxp-26 add user provisioning #174
This file contains hidden or 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: ci | |
| on: | |
| pull_request: | |
| types: [opened, reopened, synchronize] | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| go-lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Install Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version-file: 'go.mod' | |
| - name: Run linters | |
| uses: golangci/golangci-lint-action@v8 | |
| with: | |
| version: latest | |
| args: --timeout=3m | |
| go-test: | |
| strategy: | |
| matrix: | |
| platform: [ubuntu-latest] | |
| runs-on: ${{ matrix.platform }} | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Install Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version-file: 'go.mod' | |
| - name: go tests | |
| run: go test -v -covermode=count -json ./... > test.json | |
| - name: annotate go tests | |
| if: always() | |
| uses: guyarb/golang-test-annotations@v0.5.1 | |
| with: | |
| test-results: test.json | |
| test: | |
| runs-on: ubuntu-latest | |
| if: github.event_name == 'pull_request' || github.ref == 'refs/heads/main' | |
| env: | |
| BATON_LOG_LEVEL: debug | |
| # Snowflake connection configuration | |
| BATON_ACCOUNT_IDENTIFIER: ${{ secrets.BATON_ACCOUNT_IDENTIFIER }} | |
| BATON_USER_IDENTIFIER: ${{ secrets.BATON_USER_IDENTIFIER }} | |
| BATON_ACCOUNT_URL: ${{ secrets.BATON_ACCOUNT_URL }} | |
| BATON_PRIVATE_KEY: ${{ secrets.BATON_PRIVATE_KEY }} | |
| # The following parameters are passed to grant/revoke commands | |
| # Change these to the correct IDs for your test data | |
| CONNECTOR_GRANT: 'grant:entitlement:group:1234:member:user:9876' | |
| CONNECTOR_ENTITLEMENT: 'entitlement:group:1234:member' | |
| CONNECTOR_PRINCIPAL: 'user:9876' | |
| CONNECTOR_PRINCIPAL_TYPE: 'user' | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Install Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version-file: 'go.mod' | |
| - name: Build baton-snowflake | |
| run: go build -o baton-snowflake ./cmd/baton-snowflake | |
| # - name: Run baton-snowflake | |
| # run: ./baton-snowflake | |
| - name: Install baton | |
| run: ./scripts/get-baton.sh && mv baton /usr/local/bin | |
| - name: Test Account Provisioning | |
| uses: ConductorOne/github-workflows/actions/account-provisioning@v4 | |
| with: | |
| connector: './baton-snowflake' | |
| account-email: 'test-provisioning@example.com' | |
| account-login: 'test-provisioning-user' | |
| account-profile: '{"first_name": "Test", "last_name": "User", "name": "test-provisioning-user", "email": "test-provisioning@example.com"}' | |
| account-type: 'user' | |
| search-method: 'email' | |