diff --git a/.github/workflows/integration-test.yaml b/.github/workflows/integration-test.yaml new file mode 100644 index 00000000..b8c162c7 --- /dev/null +++ b/.github/workflows/integration-test.yaml @@ -0,0 +1,39 @@ +--- +name: integration-test +on: + push: + branches: [main] + tags: [v*] + pull_request: + branches: [main] +jobs: + build: + runs-on: ubuntu-latest + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + steps: + - uses: actions/checkout@v2 + + - uses: actions/setup-go@v2 + with: + go-version: '1.17' + - run: go build -o /usr/local/bin/tfmigrator ./cmd/tfmigrator + + - uses: int128/aqua-action@v1 + + - run: tfenv install + working-directory: examples/example1 + - run: terraform init + working-directory: examples/example1 + - run: terraform apply -auto-approve + working-directory: examples/example1 + - run: tfmigrator run -dry-run main.tf + working-directory: examples/example1 + - run: tfmigrator run main.tf + working-directory: examples/example1 + - run: terraform plan + working-directory: examples/example1 + - run: terraform state list + working-directory: examples/example1 + - run: git diff . + working-directory: examples/example1 diff --git a/aqua.yaml b/aqua.yaml new file mode 100644 index 00000000..9147ee78 --- /dev/null +++ b/aqua.yaml @@ -0,0 +1,6 @@ +registries: +- type: standard + ref: v0.10.1 # renovate: depName=suzuki-shunsuke/aqua-registry + +packages: +- name: tfutils/tfenv@v2.2.2