Skip to content

Commit

Permalink
replace wiht local provider
Browse files Browse the repository at this point in the history
  • Loading branch information
ScottSuarez committed Nov 3, 2023
1 parent bc14131 commit 360a642
Showing 1 changed file with 18 additions and 17 deletions.
35 changes: 18 additions & 17 deletions .github/workflows/unit-test-tgc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,21 @@ jobs:
compile-and-unit-tests:
runs-on: ubuntu-22.04
steps:
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: '^1.19'

- name: Cache Go modules and build cache
uses: actions/cache@v3
with:
path: |
~/go/pkg/mod
key: ${{ runner.os }}-test-terraform-google-conversion-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-test-terraform-google-conversion-${{ hashFiles('**/go.sum') }}
${{ runner.os }}-test-terraform-google-conversion-
- name: Download built artifacts
uses: actions/download-artifact@v2
with:
Expand All @@ -23,29 +38,15 @@ jobs:
- name: Unzip the artifacts and delete the zip
run: |
unzip artifacts-tgc/output.zip -d ./tgc
unzip artifacts-tpgb/output.zip -d ./tpgb
unzip artifacts-tpgb/output.zip -d ~/go/src/github.com/hashicorp/terraform-provider-google-beta/google-beta
rm artifacts-tgc/output.zip
rm artifacts-tpgb/output.zip
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: '^1.19'

- name: Cache Go modules and build cache
uses: actions/cache@v3
with:
path: |
~/go/pkg/mod
key: ${{ runner.os }}-test-terraform-google-conversion-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-test-terraform-google-conversion-${{ hashFiles('**/go.sum') }}
${{ runner.os }}-test-terraform-google-conversion-
- name: Build Terraform Google Conversion
run: |
export GOPATH=~/go
cd tgc
go mod edit -replace=github.com/hashicorp/terraform-provider-google-beta=../tpgb
go mod edit -replace=github.com/hashicorp/terraform-provider-google-beta=$GOPATH/src/github.com/hashicorp/terraform-provider-google-beta/google-beta
go mod tidy
make build
Expand Down

0 comments on commit 360a642

Please sign in to comment.