Skip to content

Revert "use CreateInstallationToken" #44

Revert "use CreateInstallationToken"

Revert "use CreateInstallationToken" #44

Workflow file for this run

name: Test
on:
push:
branches:
- main
pull_request:
branches:
- main
permissions:
contents: read
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
- name: Set up Go
uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
with:
go-version-file: 'go.mod'
cache: true
- name: Download dependencies
run: go mod download
- name: Run go fmt
run: |
if [ -n "$(go fmt ./...)" ]; then
echo "Please run 'go fmt ./...'"
exit 1
fi
- name: Run go vet
run: go vet ./...
- name: Run tests
run: go test -v -race ./...
test-acc:
runs-on: ubuntu-latest
if: github.event_name == 'pull_request'
steps:
- name: Checkout
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
- name: Set up Go
uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
with:
go-version-file: 'go.mod'
cache: true
- name: Download dependencies
run: go mod download
- name: Run acceptance tests
env:
TF_ACC: "1"
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_OWNER: ${{ github.repository_owner }}
run: go test -v -timeout 30m ./internal/provider/...